Skip to main content

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

  1. Get something akin to this in the numpy core;

  2. Stick to basic functionality such that projects like scikits.statsmodels can use it as a base datatype;

  3. Make an interface that allows for simple, pretty manipulation that doesn’t introduce confusion;

  4. Oh, and make sure that the base numpy array is still accessible.

Code

You can find our sources and single-click downloads:

The latest released version is always available from pypi.

Support

Please put up issues on the datarray issue tracker.

Metadata

Release files for datarray 0.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distributions (sdists)

Source distribution for datarray 0.1.0
File Size Uploaded Provenance
datarray-0.1.0.zip 75.8 kB Without provenance Details
datarray-0.1.0.tar.gz 61.6 kB Without provenance Details

Built distributions (wheels)

Table of built distributions (wheels) for datarray 0.1.0
File Interpreter ABI Platform
datarray-0.1.0-py3-none-any.whl Python 3 none any Details
datarray-0.1.0-py2-none-any.whl Python 2 none any Details

Total release size: 211.0 kB

Release files / datarray-0.1.0.zip

Download URL datarray-0.1.0.zip
Size 75.8 kB
Tags Source
SHA-256 checksum
How to use checksums
87f9da6f412db9d90d26b43ce01166884abfd95b0eb8af915b7c27e86126208b
BLAKE2b-256 checksum
How to use checksums
7501f46967e50f501b48c51940a0060193afd45629db4879b574ec868ba45455
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Release files / datarray-0.1.0.tar.gz

Download URL datarray-0.1.0.tar.gz
Size 61.6 kB
Tags Source
SHA-256 checksum
How to use checksums
4461e179210af427f17848bcf60a315b11e155732f9cd345c78c5d269946dfc9
BLAKE2b-256 checksum
How to use checksums
e1278c25c99a770f78b0ad2822f50b6214869be7da5f352c9cdcd69cf3a83d00
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Release files / datarray-0.1.0-py3-none-any.whl

Download URL datarray-0.1.0-py3-none-any.whl
Size 36.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
d89f97b5e9fa9b14809b4db3e16462ccd752a80a23b53e86facba9f14473f5c6
BLAKE2b-256 checksum
How to use checksums
194b29c1627bea5aeb42702ca01fe215c7da28ea5051e5fca924440042d25f3d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Release files / datarray-0.1.0-py2-none-any.whl

Download URL datarray-0.1.0-py2-none-any.whl
Size 36.8 kB
Tags Python 2
SHA-256 checksum
How to use checksums
73b9d69286ea0a4e7984335067abd231e59bfb72bbdb2d0430d07f14b086fd7f
BLAKE2b-256 checksum
How to use checksums
b839b19d4dd96eba2b9a3bf674469162980755698319521f5173ab74ee5f098f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Security for datarray 0.1.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page