zarr-indexing
Composable, lazy coordinate transforms for Zarr array indexing.
Documentation: https://zarr-indexing.readthedocs.io/
This package implements TensorStore-inspired index transforms. The core idea:
each supported indexing operation (slicing, fancy indexing, etc.) produces a coordinate
mapping from user space to storage space. These mappings compose without reading selected source values. LazyArray
materializes them on request; the transform algebra itself performs no source I/O.
Key types:
LazyArray— wraps a system-memory/basic-indexing source with lazy indexing:LazyArray.from_numpy(numpy_array)[10:50, ::2].oindex[[3, 1, 1], :]. The key's type picks the frame: NumPy keys are positions relative to the view, while anIndexDomainorIndexTransformkey addresses the view's absolute domain, which every view keeps. composes a transform and returns a new view without reading data, andresult()materializes it into owned system memory.LazyArray(source)uses the basic reader;from_numpyselectsnumpy_reader, which currently uses the same slab-and-gather implementation. Device sources that refuse NumPy conversion need a custom reader to transfer values into the output buffer.Reader— the explicit backend execution boundary: transforms say which values belong in the result, while readers say how a backend obtains themIndexDomain— a rectangular region of integer coordinatesIndexTransform— maps input coordinates to storage coordinatesChunkPlanandChunkProjection— lazily partition a selection over a caller-selected grid and pair each chunk-local transform with its placement in the request, without binding a storage backend or schedulerGridPartition— the plan's factored, columnar form: one table per axis (StridedSet,IndexedSet) plusjoint_setsfor connected index-array components, from which projections are derived on demandConstantMap,DimensionMap,ArrayMap— the three ways a single output dimension can depend on the inputcompose— chain two transforms into one
The base package depends on NumPy and the standard library; its optional testing
module also requires Hypothesis. The package does not import zarr. It is developed
in the zarr-python repository,
and its examples include reading Zarr arrays through Dask. Installing it does not
replace Zarr's indexing implementation.
Installation
pip install zarr-indexing
Examples
Contributing
Development commands, the test suite and the docs build are described in CONTRIBUTING.md in the repository. Issues and pull requests go to zarr-developers/zarr-python.
Metadata
Release files for zarr-indexing 0.3.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 | |
|---|---|---|---|
| zarr_indexing-0.3.0.tar.gz | 314.7 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| zarr_indexing-0.3.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 435.8 kB
Release files / zarr_indexing-0.3.0.tar.gz
| Download URL | zarr_indexing-0.3.0.tar.gz |
|---|---|
| Size | 314.7 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
c0991b5b5666442a29defcf6796b0f4cba9c5154634a9831313191f7d5ab6d1b
|
|
BLAKE2b-256 checksum How to use checksums |
c1bb0fd5f112b25b3672464129101874460c6f2f3f775fed22cf5058de6a6630
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
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 Sep 29, 2026.
Transparency logRelease files / zarr_indexing-0.3.0-py3-none-any.whl
| Download URL | zarr_indexing-0.3.0-py3-none-any.whl |
|---|---|
| Size | 121.1 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
ee64a4fc8783c1f04074f640b42f0d5c91ccedb13929ac1395dbaf547d25bbf7
|
|
BLAKE2b-256 checksum How to use checksums |
5b337e136f398c56c7ac5e8c418f7dbe4c3647c12e75bdc35fe9eb0a06d2d1f3
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
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 Sep 29, 2026.
Transparency log