tensorstore.ChunkLayout.read_chunk_template : IndexDomain

Chunk offset and shape for efficient reads.

Example

>>> layout = ts.ChunkLayout(grid_origin=[5, 6, 7],
...                         read_chunk_shape=[100, 200, 300])
>>> layout.read_chunk_template
{ [5, 105), [6, 206), [7, 307) }

Note

Only the hard constraints grid_origin and shape of read_chunk are taken into account. The soft constraints grid_origin_soft_constraint and all other constraints specified on read_chunk are ignored.

For any dimension i for which self.grid_origin[i] is None or self.read_chunk_shape[i] is None, self.read_chunk_template[i] is an unbounded interval ts.Dim():

>>> layout = ts.ChunkLayout(grid_origin=[None, 6, 7],
...                         read_chunk_shape=[100, None, 200])
>>> layout.read_chunk_template
{ (-inf, +inf), (-inf, +inf), [7, 207) }
Raises:

ValueError – If rank is unspecified or grid_origin and self.read_chunk.shape are incompatible.