class tensorstore.ChunkLayout.Grid

Describes a regular grid layout for write/read/codec chunks.

Constructors

Grid(*, rank: int | None = None, ...)

Constructs a chunk grid.

Grid(json: Any)

Constructs from the JSON representation.

Public members

update(*, rank: int | None = None, ...) None

Adds additional constraints.

to_json(include_defaults: bool = False) Any

Converts to the JSON representation.

rank : int | None

Number of dimensions, or None if unspecified.

ndim : int | None

Alias for rank.

shape : tuple[int | None, ...] | None

Hard constraints on chunk shape.

shape_soft_constraint : tuple[int | None, ...] | None

Soft constraints on chunk shape.

aspect_ratio : tuple[float | None, ...] | None

Chunk shape aspect ratio.

aspect_ratio_soft_constraint : tuple[float | None, ...] | None

Soft constraints on chunk shape aspect ratio.

elements : int | None

Target number of elements per chunk.

elements_soft_constraint : int | None

Soft constraint on target number of elements per chunk.

Comparison operators

__eq__(other: ChunkLayout.Grid) bool

Compares two chunk grids for equality.