tensorstore.ChunkLayout.write_chunk_template : IndexDomain

Chunk offset and shape for efficient writes.

Example

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

Note

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

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

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

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