tensorstore.OutputIndexMap(index_array: ArrayLike, offset: int = 0, stride: int = 1, index_range: Dim = Dim())

Constructs an index array map.

Example

>>> transform = ts.IndexTransform(
...     input_shape=[5],
...     output=[ts.OutputIndexMap(index_array=[2, 3, 5, 7, 11])])
>>> [transform([i]) for i in range(5)]
[(2,), (3,), (5,), (7,), (11,)]