Skip to main content

Composable, lazy coordinate transforms for Zarr array indexing.

Project description

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:

  • IndexDomain — a rectangular region of integer coordinates
  • IndexTransform — maps input coordinates to storage coordinates
  • ConstantMap, DimensionMap, ArrayMap — the three ways a single output dimension can depend on the input
  • compose — 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

Developing

Package-scoped development commands live in the justfile (requires just):

just test        # run the test suite (extra args go to pytest)
just lint        # ruff, same invocation as CI
just typecheck   # pyright, same invocation as CI
just docs-check  # strict build of the docs site
just check       # all of the above
just docs-serve  # serve the docs site locally

Run them from this directory, or from anywhere in the repository as just packages/zarr-indexing/<recipe>.

The test recipe runs against the workspace-root environment, because the chunk-resolution tests exercise this package against zarr's chunk grids and zarr is deliberately not a dependency of this package.

License

MIT

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

zarr_indexing-0.1.0.tar.gz (124.6 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

zarr_indexing-0.1.0-py3-none-any.whl (39.9 kB view details)

Uploaded Python 3

File details

Details for the file zarr_indexing-0.1.0.tar.gz.

File metadata

  • Download URL: zarr_indexing-0.1.0.tar.gz
  • Upload date:
  • Size: 124.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.13

File hashes

Hashes for zarr_indexing-0.1.0.tar.gz
Algorithm Hash digest
SHA256 672675a53a32d12e31007e6852f1d59a79b7d2993205af7568e8a0c50c2a2f3a
MD5 6721fedf0ff45b92db6c4885b48448cc
BLAKE2b-256 429bce8e30e46deb0ba9e6c481d7e9e39d3cf5e7bc84bfd82431dfaaa39f7d3d

See more details on using hashes here.

Provenance

The following attestation bundles were made for zarr_indexing-0.1.0.tar.gz:

Publisher: zarr-indexing-release.yml on zarr-developers/zarr-python

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file zarr_indexing-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: zarr_indexing-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 39.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.13

File hashes

Hashes for zarr_indexing-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 cb21425a69bdf4ef33ec0cf9ab9ac4fcfe1e2a7a0a8a9c1752d39791ee1fdc9a
MD5 53712818cd9d2a76990bea1858f2cba0
BLAKE2b-256 86d81288d04953b75ad63bfd2c18ce894b17bc2143841af69ace0872e37b0e77

See more details on using hashes here.

Provenance

The following attestation bundles were made for zarr_indexing-0.1.0-py3-none-any.whl:

Publisher: zarr-indexing-release.yml on zarr-developers/zarr-python

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page