Skip to main content

Memory-mapped numeric arrays, based on a format that is self-explanatory and tool-independent

Project description

Github CI Status Appveyor Status PyPi version Conda Forge Codecov Badge Docs Status Zenodo Badge Updates

Darr is a Python library that stores NumPy arrays on disk in a way that is simple and self-documented, which makes them easily accessible from a wide range of computing environments. Arrays are automatically kept up-to-date with a full explanation of how data is stored, including code to read itself in languages such as R, Julia, IDL, Matlab, Maple, and Mathematica, or in Python/Numpy without Darr (see example). Keeping data universally readable and documented is a pillar of good scientific practice, and a good idea in general. More rationale for a tool-independent approach to numeric array storage is provided here.

Under the hood, Darr uses NumPy memory-mapped arrays, which is a widely established and trusted way of working with disk-based numerical arrays, and which makes Darr fully NumPy compatible. This enables efficient out-of-core read/write access to potentially very large arrays. What Darr adds is that it automatically keeps your arrays fully documented, open, and thus widely readable. Further, Darr adds functionality to make your life easier in other ways, such as the support for ragged arrays, the ability to create arrays from iterators, append and truncate functionality, and the easy use of metadata.

Flat binary files and (JSON) text files are accompanied by a README text file that explains how the array and metadata are stored (see example arrays). It is trivially easy to share your arrays with others or with yourself when working in different computing environments because they always contains clear documentation of the specific data at hand, including code to read it. Does your colleague want to try out an interesting algorithm in R or Matlab on your arrays? No need to export anything or to provide elaborate explanation. No dependence on complicated formats or specialized libraries. No looking up things. A copy-paste of a few lines of code from the documentation stored with the data is sufficient. Self-documentation and code examples are automatically updated as you change your arrays when working with them.

See this tutorial for a brief introduction, or the documentation for more info.

Darr is currently pre-1.0, still undergoing development. It is open source and freely available under the New BSD License terms.

Features

  • Data is stored purely based on flat binary and text files, maximizing universal readability.

  • Automatic self-documention, including copy-paste ready code snippets for reading the array in a number of popular data analysis environments, such as Python (without Darr), R, Julia, Octave/Matlab, GDL/IDL, and Mathematica (see example array).

  • Disk-persistent array data is directly accessible through NumPy indexing and may be larger than RAM and that is easily appendable.

  • Supports ragged arrays.

  • Easy use of metadata, stored in a widely readable separate JSON text file.

  • Many numeric types are supported: (u)int8-(u)int64, float16-float64, complex64, complex128.

  • Integrates easily with the Dask library for out-of-core computation on very large arrays.

  • Minimal dependencies, only NumPy.

See the documentation for more information.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

darr-0.5.3.tar.gz (66.2 kB view details)

Uploaded Source

Built Distribution

darr-0.5.3-py3-none-any.whl (54.5 kB view details)

Uploaded Python 3

File details

Details for the file darr-0.5.3.tar.gz.

File metadata

  • Download URL: darr-0.5.3.tar.gz
  • Upload date:
  • Size: 66.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.0 CPython/3.9.7

File hashes

Hashes for darr-0.5.3.tar.gz
Algorithm Hash digest
SHA256 4002ee959d000103e5e6d566f8e822c3330a61190037e8a8038f75a1766e2de0
MD5 5caa74ccf4a902dc011bdafeb72ad8a5
BLAKE2b-256 49f19f3f621f1054f3df26b8cac05e1543b5b6e698c40f2f44ca6005df074bbd

See more details on using hashes here.

File details

Details for the file darr-0.5.3-py3-none-any.whl.

File metadata

  • Download URL: darr-0.5.3-py3-none-any.whl
  • Upload date:
  • Size: 54.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.0 CPython/3.9.7

File hashes

Hashes for darr-0.5.3-py3-none-any.whl
Algorithm Hash digest
SHA256 4897ca6518968d503fd9c594cf7becf03111aabf815aba2d632119ee7198a7eb
MD5 a1a08d0d0ef99dc3af00d469e949151e
BLAKE2b-256 736e4bc8d071e4391918fdc224a1a88361e0a21d83b327e908e21bf708d9a25c

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page