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: every indexing operation (slicing, fancy indexing, etc.) produces a coordinate mapping from user space to storage space. These mappings compose lazily — no I/O until you explicitly read or write.
Key types:
LazyArray— wraps a system-memory/basic-indexing source and adds a.lazyaccessor:LazyArray.from_numpy(numpy_array).lazy[10:50, ::2].lazy.oindex[[3, 1, 1], :]composes a transform and returns a new view without reading data, andresult()materializes it into owned system memory.LazyArray(source)uses the conservative basic reader;from_numpyexplicitly selects NumPy's optimized reader. Device arrays require an explicit custom reader responsible for transferring values into the supplied system-memory 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 schedulerConstantMap,DimensionMap,ArrayMap— the three ways a single output dimension can depend on the inputcompose— chain two transforms into one
The package depends only on NumPy and the standard library; it does not import
zarr. It is developed in the zarr-python
repository and consumed by zarr to resolve array indexing operations.
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.2.1
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.2.1.tar.gz | 267.7 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| zarr_indexing-0.2.1-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 375.8 kB
Release files / zarr_indexing-0.2.1.tar.gz
| Download URL | zarr_indexing-0.2.1.tar.gz |
|---|---|
| Size | 267.7 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
ae8246d284d242d504698708f402db159a8ce75e8610b0a5754e03ccd7073613
|
|
BLAKE2b-256 checksum How to use checksums |
45b8803a47caac58ea691a533c5ede821e6a772fc928963b5bae42bbfc82a8a8
|
| 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 Aug 12, 2026.
Transparency logRelease files / zarr_indexing-0.2.1-py3-none-any.whl
| Download URL | zarr_indexing-0.2.1-py3-none-any.whl |
|---|---|
| Size | 108.1 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
e607e492876c82be6d5c22904e75060fadbf2340ab4364b5bf5a0821adee625e
|
|
BLAKE2b-256 checksum How to use checksums |
7d62d0e463ac800062a509779ffb2eec3a44dba74330a0c6630852d58226a336
|
| 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 Aug 12, 2026.
Transparency log