Skip to content

Array

zarrista.Array

A read-only Zarr array.

attrs property

attrs: dict[str, Any]

The array's user attributes as a dict.

chunk_grid property

chunk_grid: ChunkGrid

The chunk grid of the array.

codecs property

codecs: CodecChain

The codec chain used to encode and decode the array's chunks.

dimension_names property

dimension_names: list[str | None] | None

The dimension names, if any were specified.

dtype property

dtype: DataType

The Zarr data type.

metadata property

metadata: dict[str, Any]

The array's full Zarr v3 metadata as a dict.

ndim property

ndim: int

The number of dimensions.

path property

path: str

The array's path in the store.

shape property

shape: list[int]

The array shape.

__getitem__

__getitem__(selection: Selection) -> Data

Read a region with numpy-style basic indexing, e.g. arr[0:10, :, 5].

Sugar for retrieve_array_subset.

open staticmethod

open(store: FilesystemStore | MemoryStore, path: str = '/') -> Array

Open the array stored at path in store.

retrieve_array_subset

retrieve_array_subset(selection: Selection) -> Data

Read and decode an array region selected with numpy-style basic indexing.

The result is ndim-preserving (consistent with a zarrs ArraySubset): an integer selects a length-1 range and that axis is retained.

retrieve_chunk

retrieve_chunk(chunk_indices: list[int]) -> Data

Read and decode the chunk at the given chunk grid indices.

zarrista.AsyncArray

A read-only Zarr array backed by an async store.

attrs property

attrs: dict[str, Any]

The array's user attributes as a dict.

chunk_grid property

chunk_grid: ChunkGrid

The chunk grid of the array.

codecs property

codecs: CodecChain

The codec chain used to encode and decode the array's chunks.

dimension_names property

dimension_names: list[str | None] | None

The dimension names, if any were specified.

dtype property

dtype: DataType

The Zarr data type.

metadata property

metadata: dict[str, Any]

The array's full Zarr v3 metadata as a dict.

ndim property

ndim: int

The number of dimensions.

path property

path: str

The array's path in the store.

shape property

shape: list[int]

The array shape.

__getitem__ async

__getitem__(selection: Selection) -> Data

Read a region with numpy-style basic indexing: await arr[0:10, :, 5].

Sugar for retrieve_array_subset.

open_async async staticmethod

open_async(store: AsyncStore, path: str = '/') -> AsyncArray

Open the array stored at path in store.

store may be an obstore ObjectStore or an icechunk Session.

retrieve_array_subset async

retrieve_array_subset(selection: Selection) -> Data

Read and decode an array region selected with numpy-style basic indexing.

The result is ndim-preserving (consistent with a zarrs ArraySubset): an integer selects a length-1 range and that axis is retained.

retrieve_chunk async

retrieve_chunk(chunk_indices: list[int]) -> Data

Read and decode the chunk at the given chunk grid indices.