Memory-mapped .npz files.
Project description
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.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file mmnpz-1.0.0.tar.gz.
File metadata
- Download URL: mmnpz-1.0.0.tar.gz
- Upload date:
- Size: 9.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/5.1.1 CPython/3.12.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b4a6909c0bd728fa6d710c2edb2cdd6e567fa1942fe55c4fae0b8ce8422baad9
|
|
| MD5 |
ea3dfd5ba6bf85a3ae617a79ad142eae
|
|
| BLAKE2b-256 |
66a55cfd8b6d70faeea6b830843158d8f2415de7e08e79894fff754c6461e553
|
Provenance
The following attestation bundles were made for mmnpz-1.0.0.tar.gz:
Publisher:
pypi.yml on f0k/mmnpz
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
mmnpz-1.0.0.tar.gz -
Subject digest:
b4a6909c0bd728fa6d710c2edb2cdd6e567fa1942fe55c4fae0b8ce8422baad9 - Sigstore transparency entry: 151752757
- Sigstore integration time:
-
Permalink:
f0k/mmnpz@8f03af00a3e73d3d07cee723694b7415cdbf2e72 -
Branch / Tag:
refs/tags/v1.0.0 - Owner: https://github.com/f0k
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
pypi.yml@8f03af00a3e73d3d07cee723694b7415cdbf2e72 -
Trigger Event:
release
-
Statement type:
File details
Details for the file mmnpz-1.0.0-py3-none-any.whl.
File metadata
- Download URL: mmnpz-1.0.0-py3-none-any.whl
- Upload date:
- Size: 7.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/5.1.1 CPython/3.12.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
70683c12bd06dd02f320f2cb555226183a6d61e3c5769b4e8c59d3dd4433301e
|
|
| MD5 |
38abc6f8e51e6eece4e09e7a22110113
|
|
| BLAKE2b-256 |
ccd7cf59916921d7042708fdb6a8230575ba900182aa428e384c890bbb10c5d1
|
Provenance
The following attestation bundles were made for mmnpz-1.0.0-py3-none-any.whl:
Publisher:
pypi.yml on f0k/mmnpz
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
mmnpz-1.0.0-py3-none-any.whl -
Subject digest:
70683c12bd06dd02f320f2cb555226183a6d61e3c5769b4e8c59d3dd4433301e - Sigstore transparency entry: 151752759
- Sigstore integration time:
-
Permalink:
f0k/mmnpz@8f03af00a3e73d3d07cee723694b7415cdbf2e72 -
Branch / Tag:
refs/tags/v1.0.0 - Owner: https://github.com/f0k
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
pypi.yml@8f03af00a3e73d3d07cee723694b7415cdbf2e72 -
Trigger Event:
release
-
Statement type: