{ "info": { "author": "William Song", "author_email": "songcwzjut@163.com", "bugtrack_url": null, "classifiers": [ "Intended Audience :: Science/Research", "License :: Public Domain", "Natural Language :: English", "Operating System :: OS Independent", "Programming Language :: Python", "Programming Language :: Python :: 3.6", "Topic :: Scientific/Engineering :: Mathematics" ], "description": "Introduction\n=============\n\nAbstract\n----------\nAn awesome tool for indexing matrices. propose a new concept \u201csingle index\u201d (as in matlab) to index the elements from matrices. exchange python-style index(begin with 0) with matlab-style index(begin with 1)\n\nKeywords\n----------\nIndex, Matrix, Single Index, Style of Index\n\n\nNew feature: \n\n 1. fix some bugs\n\nFeature:\n\n 1. propose single index\n 2. change to (back from) matlab-style index\n 3. arithmetic of the index\n\n\nContent\n=========\n\nClasses::\n\n SingleIndex: wrapper of int, list, slice\n Index: array of SingleIndex\n\n\nInterface::\n\n Arith: arithmetic of index\n\n\nfunction::\n\n irange: interval-like index\n\n\nGrammar\n=========\n\nBasic grammar\n-------------\n\nimport::\n\n import pindex # python for index\n\nExample::\n\n ind = SingleIndex([1,2,3]) # construct a single index\n s = ind('helloworld') # index(array) == array[index]\n print(s)\n \n A = np.array([[1,2,6],[3,4,5]])\n B = ind(A)\n print(B) # index matrix with single index as in matlab\n\n ind.py2matlab() # change to matlab style\n s = ind('helloworld')\n print(s) # output: hel\n\n ind = Index([1,2,3]) # for 1dim array, Index == SingleIndex\n ss = ind('helloworld')\n print(ss)\n\n ind = Index(([1,2],[3,4])) # construct multi-index\n try:\n ss = ind(['hello', 'world'])\n print(ss)\n except:\n ind.py2matlab()\n ss = ind(['hello', 'world'])\n print(ss)\n\n\nAttention::\n\n ind = SingleIndex([1,2,3])\n A = [[1,2,6],[3,4,5]]\n B = ind(A) # pindex.py thinks A is a list (of lists, with length 2) instead of matrix\n ind = Index(([0,1],[0,1])) # this is ok, since you use multi-index", "description_content_type": "", "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/Freakwill/pindex", "keywords": "Index,Matrix,Single Index,Style of Index", "license": "MIT", "maintainer": "", "maintainer_email": "", "name": "pindex", "package_url": "https://pypi.org/project/pindex/", "platform": "", "project_url": "https://pypi.org/project/pindex/", "project_urls": { "Homepage": "https://github.com/Freakwill/pindex" }, "release_url": "https://pypi.org/project/pindex/0.5.1/", "requires_dist": null, "requires_python": "", "summary": "An awesome tool for indexing matrices. propose a new concept \u201csingle index\u201d (as in matlab) to index the elements from matrices. exchange python-style index(begin with 0) with matlab-style index(begin with 1)", "version": "0.5.1" }, "last_serial": 4687743, "releases": { "0.5.1": [ { "comment_text": "", "digests": { "md5": "86d44298907e6fd26c3c514966352bd3", "sha256": "f9f30b6603f982e5739f14afb8e0a15f448d505081c51387d335b402c5d77241" }, "downloads": -1, "filename": "pindex-0.5.1.tar.gz", "has_sig": false, "md5_digest": "86d44298907e6fd26c3c514966352bd3", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 5038, "upload_time": "2019-01-12T03:58:07", "url": "https://files.pythonhosted.org/packages/ec/9c/bad05f469f68617a500e17c20eea99835552506c1ce50ca24fee2a3c0b3a/pindex-0.5.1.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "86d44298907e6fd26c3c514966352bd3", "sha256": "f9f30b6603f982e5739f14afb8e0a15f448d505081c51387d335b402c5d77241" }, "downloads": -1, "filename": "pindex-0.5.1.tar.gz", "has_sig": false, "md5_digest": "86d44298907e6fd26c3c514966352bd3", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 5038, "upload_time": "2019-01-12T03:58:07", "url": "https://files.pythonhosted.org/packages/ec/9c/bad05f469f68617a500e17c20eea99835552506c1ce50ca24fee2a3c0b3a/pindex-0.5.1.tar.gz" } ] }