Skip to main content

utilities for managing nested lists of lists of scipy.sparse matrices

Project description

coo_utils works with numpy and scipy.sparse (2D only) to store compressed multidimensional arrays both in memory and on disks. This can DRASTICALLY reduce the space required.

In reality, what is stored is a list-of-lists containing sparse matrix nodes in the scipy.sparse.coo_matrix format. The storage format can either be normal or differenced (helpful for same-value blocks data).

Some terms used in the code:

CooHD: list (or deeply nested list(s)) of scipy.sparse.coo_matrix’s (HD means higher-dimensional)

nnzs: An array with the same shape as the nested lists in the cooHD (aka without the 2 coo_matrix dimensions) that gives the length of each coo_matrix (nnz) at each node of the tree

RCD: A sparse array represented as a flat row-column-data matrix. Multi-dimensional shape data is recoverable using the nnzs array

The disk storage format uses the RCD fomat for maximum simplicity:

*_rcd.npy - The rcd matrix stored in the .npy format (int32)

*_nnzs.npy - The nnzs array store in .npy format (int)

*_shape.txt - a simple text file with the full shape of the array in comma-separated plain text

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

coo_utils-0.1.2.1.tar.gz (3.0 kB view details)

Uploaded Source

File details

Details for the file coo_utils-0.1.2.1.tar.gz.

File metadata

  • Download URL: coo_utils-0.1.2.1.tar.gz
  • Upload date:
  • Size: 3.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for coo_utils-0.1.2.1.tar.gz
Algorithm Hash digest
SHA256 dcbe6bca784f9c08e604ff1c02472f3dda616e75621f8eec28e308dcdff2abba
MD5 fdddd6585777c74f72563b16e507f306
BLAKE2b-256 667d0f23e03003e2785983877224e1d954e0ea194df8129743d94f0af4030f24

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