{ "info": { "author": "Sylvain Guieu", "author_email": "sylvain.guieu@gmail.com", "bugtrack_url": null, "classifiers": [ "Development Status :: 3 - Alpha", "Intended Audience :: Science/Research", "License :: OSI Approved :: MIT License", "Programming Language :: Python :: 2.6", "Programming Language :: Python :: 2.7", "Programming Language :: Python :: 3", "Programming Language :: Python :: 3.2", "Programming Language :: Python :: 3.3", "Programming Language :: Python :: 3.4", "Topic :: Scientific/Engineering" ], "description": "Title : axarray \nAuthor : sylvain.guieu@gmail.com\n\n# Introduction\naxarray is a numpy array where axes can be labeled.\n\nThe idea is to be able to manipulate array, and do operation on axis without knowing the array shape order but on knowing labels related to the 'physical' meaning of the axes.\n\nOften in science, it is useful to name the array axes by an intelligible label. \nFor instance, for 2d images taken at different time, axes name of the obtain cube could be `[\"time\", \"y\", \"x\"]`\n\n\naxarray object aims to do that. For instance `a.mean(axis=\"time\")` will execute the mean on the axis labeled `\"time\"` where ever it is.\n\nGiven a1 and a2, two axarray, binary operation like a1+a2 can be performed even if the two axarray has different axes order as long as they have matching axis labels. \n\n# installation \nWith pip\n```\n> pip install axarray \n```\n\nOr from git in your PYTHON_PATH\n\n```\n> git clone https://github.com/SylvainGuieu/axarray.git\n```\n\n# Examples \n\n```python\n>>> a = axarray( np.random.random((10,4,5)), [\"time\", \"y\", \"x\"])\n>>> b = a.transpose( [\"x\",\"time\", \"y\"])\n>>> b.axes\n[\"x\",\"time\", \"y\"]\n```\n\ncan operate 2 transposed axarray as long as they match axis names \n\n```python\n>>> (a+b).axes\n[\"time\", \"y\", \"x\"]\n```\nuse the numpy frunction with axis labels\n\n```python\n>>> a.min(axis=\"time\").shape\n(4,5) \n# similar to: \n>>> np.min(a , axis=\"time\")\n```\n\naxis can be alist of axis label\n\n```python \n>>> a.mean(axis=[\"x\",\"y\"]).shape\n(10,)\n``` \n\none can use the convenient apply method. Useful in non-direct call as in a plot func for instance \n\n```python\n>>> a.apply(time_reduce=np.mean, y_idx=slice(0,2)).shape\n(2,5)\n```\n\ntranspose, reshape rename axes in one call \n\n```python\n>>> at = a.transform( [(\"pixel\", \"y\",\"x\"), \"time\"]) \n>>> at.shape\n(20, 10) # (4*5, 10)\n>>> at.axes\n['pixel', 'time']\n```\n\nExtract a spectrum from image from named indices \n\n```python\n### make some indices \n>>> iy, ix = axarray( np.indices( (3,4)), [0 ,\"spatial\", \"freq\"])\n>>> ax[:,iy,ix].axes\n['time', 'spatial', 'freq']\n```", "description_content_type": null, "docs_url": null, "download_url": "UNKNOWN", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/SylvainGuieu/axarray/", "keywords": "array numpy axes", "license": "LICENSE.txt", "maintainer": null, "maintainer_email": null, "name": "axarray", "package_url": "https://pypi.org/project/axarray/", "platform": "UNKNOWN", "project_url": "https://pypi.org/project/axarray/", "project_urls": { "Download": "UNKNOWN", "Homepage": "https://github.com/SylvainGuieu/axarray/" }, "release_url": "https://pypi.org/project/axarray/0.1.1/", "requires_dist": null, "requires_python": null, "summary": "numpy array with labeled axes", "version": "0.1.1" }, "last_serial": 1764612, "releases": { "0.1.0": [ { "comment_text": "", "digests": { "md5": "88c90dfb5b169397dc5462b9c75d81c5", "sha256": "1c9fecf5159e64642cb1981482a39317c10d40af0573a61981422f8c2f4a67e4" }, "downloads": -1, "filename": "axarray-0.1.0.tar.gz", "has_sig": false, "md5_digest": "88c90dfb5b169397dc5462b9c75d81c5", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 2013, "upload_time": "2015-10-12T13:53:17", "url": "https://files.pythonhosted.org/packages/ca/4c/270c9745c8e8301b036d5a7d6ee56f2a128653d2853dfa18792895e84a28/axarray-0.1.0.tar.gz" } ], "0.1.1": [ { "comment_text": "", "digests": { "md5": "0c323bb87113dec2aa1fca32373b206c", "sha256": "fb66ba1129696ad803dc3db52e9bac83160bf2c7e196ecb33ede1d49b196455e" }, "downloads": -1, "filename": "axarray-0.1.1.tar.gz", "has_sig": false, "md5_digest": "0c323bb87113dec2aa1fca32373b206c", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 2071, "upload_time": "2015-10-12T15:50:02", "url": "https://files.pythonhosted.org/packages/ce/94/58e99b0f04ecf301a057a99404006ca534111c3242900cb37226d3464d67/axarray-0.1.1.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "0c323bb87113dec2aa1fca32373b206c", "sha256": "fb66ba1129696ad803dc3db52e9bac83160bf2c7e196ecb33ede1d49b196455e" }, "downloads": -1, "filename": "axarray-0.1.1.tar.gz", "has_sig": false, "md5_digest": "0c323bb87113dec2aa1fca32373b206c", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 2071, "upload_time": "2015-10-12T15:50:02", "url": "https://files.pythonhosted.org/packages/ce/94/58e99b0f04ecf301a057a99404006ca534111c3242900cb37226d3464d67/axarray-0.1.1.tar.gz" } ] }