NumPy arrays with named axes and named indices.
Project description
Scientists, engineers, mathematicians and statisticians don’t just work with matrices; they often work with structured data, just like you’d find in a table. However, functionality for this is missing from Numpy, and there are efforts to create something to fill the void. This is one of those efforts.
Datarray provides a subclass of Numpy ndarrays that support:
individual dimensions (axes) being labeled with meaningful descriptions
labeled ‘ticks’ along each axis
indexing and slicing by named axis
indexing on any axis with the tick labels instead of only integers
reduction operations (like .sum, .mean, etc) support named axis arguments instead of only integer indices.
Prior Art
In no particular order:
xray - very close in spirit to this package, xray implements named ND array axes and tick labels. It integrates with (and depends on) Pandas;
pandas is based around a number of DataFrame-esque datatypes.
Tabular implements a spreadsheet-inspired datatype, with rows/columns, csv/etc. IO, and fancy tabular operations.
scikits.statsmodels sounded as though it had some features we’d like to eventually see implemented on top of something such as datarray, and Skipper seemed pretty interested in something like this himself.
scikits.timeseries also has a time-series-specific object that’s somewhat reminiscent of labeled arrays.
pandas is based around a number of DataFrame-esque datatypes.
pydataframe is supposed to be a clone of R’s data.frame.
larry, or “labeled array,” often comes up in discussions alongside pandas.
divisi includes labeled sparse and dense arrays.
pymvpa provides Dataset class encapsulating the data together with matching in length sets of attributes for the first two (samples and features) dimensions. Dataset is not a subclass of numpy array to allow other data structures (e.g. sparse matrices).
ptsa subclasses ndarray to provide attributes per dimensions aiming to ease slicing/indexing given the values of the axis attributes
Project Goals
Get something akin to this in the numpy core;
Stick to basic functionality such that projects like scikits.statsmodels can use it as a base datatype;
Make an interface that allows for simple, pretty manipulation that doesn’t introduce confusion;
Oh, and make sure that the base numpy array is still accessible.
Code
You can find our sources and single-click downloads:
Main repository on Github;
Documentation for the current release;
Download the current trunk as a tar/zip file;
Downloads of all available releases.
The latest released version is always available from pypi.
Support
Please put up issues on the datarray issue tracker.
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distributions
Built Distributions
File details
Details for the file datarray-0.1.0.zip
.
File metadata
- Download URL: datarray-0.1.0.zip
- Upload date:
- Size: 75.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 87f9da6f412db9d90d26b43ce01166884abfd95b0eb8af915b7c27e86126208b |
|
MD5 | 18eaa47c5ad90f4db5a2a573e1f9d159 |
|
BLAKE2b-256 | 7501f46967e50f501b48c51940a0060193afd45629db4879b574ec868ba45455 |
File details
Details for the file datarray-0.1.0.tar.gz
.
File metadata
- Download URL: datarray-0.1.0.tar.gz
- Upload date:
- Size: 61.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 4461e179210af427f17848bcf60a315b11e155732f9cd345c78c5d269946dfc9 |
|
MD5 | 47f27ddd9fa01ba3bc493d6c9776f503 |
|
BLAKE2b-256 | e1278c25c99a770f78b0ad2822f50b6214869be7da5f352c9cdcd69cf3a83d00 |
File details
Details for the file datarray-0.1.0-py3-none-any.whl
.
File metadata
- Download URL: datarray-0.1.0-py3-none-any.whl
- Upload date:
- Size: 36.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | d89f97b5e9fa9b14809b4db3e16462ccd752a80a23b53e86facba9f14473f5c6 |
|
MD5 | c9b368e8a2256b864d1dec2e95f7afdc |
|
BLAKE2b-256 | 194b29c1627bea5aeb42702ca01fe215c7da28ea5051e5fca924440042d25f3d |
File details
Details for the file datarray-0.1.0-py2-none-any.whl
.
File metadata
- Download URL: datarray-0.1.0-py2-none-any.whl
- Upload date:
- Size: 36.8 kB
- Tags: Python 2
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 73b9d69286ea0a4e7984335067abd231e59bfb72bbdb2d0430d07f14b086fd7f |
|
MD5 | 56ea4b18668fe91427eeb5b55d0191c2 |
|
BLAKE2b-256 | b839b19d4dd96eba2b9a3bf674469162980755698319521f5173ab74ee5f098f |