mmnpz
mmnpz is a small Python package for handling large .npz files. .npz files are uncompressed zip files containing numpy arrays. mmnpz unlocks their potential as an efficient, standardized option for storing and accessing large datasets.
Installation
mmnpz is available on PyPI. To install the latest release, run:
pip install mmnpz
Usage
mmnpz can write large .npz files incrementally:
>>> import numpy as np
>>> import mmnpz
>>> with mmnpz.NpzWriter("test.npz") as f:
>>> for i in range(10):
>>> f.write(f"a{i}", np.full(10000, i))
mmnpz can read large .npz files as memory maps:
>>> import mmnpz
>>> x = mmnpz.load("test.npz")
>>> x["a2"][10:15]
memmap([2, 2, 2, 2, 2])
This allows accessing individual excerpts of large datasets without I/O overhead.
Documentation
The documentation is hosted on readthedocs.
Acknowledgements
The package layout and toolchain is based on Ai2's Python package template, Microsoft's Python package template and pytest's Python package. The package was developed at the Institute of Computational Perception, Johannes Kepler University Linz.
Metadata
Release files for mmnpz 1.0.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| mmnpz-1.0.0.tar.gz | 9.5 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| mmnpz-1.0.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 17.3 kB
Release files / mmnpz-1.0.0.tar.gz
| Download URL | mmnpz-1.0.0.tar.gz |
|---|---|
| Size | 9.5 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
b4a6909c0bd728fa6d710c2edb2cdd6e567fa1942fe55c4fae0b8ce8422baad9
|
|
BLAKE2b-256 checksum How to use checksums |
66a55cfd8b6d70faeea6b830843158d8f2415de7e08e79894fff754c6461e553
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/5.1.1 CPython/3.12.7
|
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.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 26, 2024.
Transparency logRelease files / mmnpz-1.0.0-py3-none-any.whl
| Download URL | mmnpz-1.0.0-py3-none-any.whl |
|---|---|
| Size | 7.8 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
70683c12bd06dd02f320f2cb555226183a6d61e3c5769b4e8c59d3dd4433301e
|
|
BLAKE2b-256 checksum How to use checksums |
ccd7cf59916921d7042708fdb6a8230575ba900182aa428e384c890bbb10c5d1
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/5.1.1 CPython/3.12.7
|
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.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 26, 2024.
Transparency log