tensorstore.IndexDomain.__getitem__(self, transform: IndexTransform) IndexDomain

Transforms the domain using an explicit index transform.

Example

>>> domain = ts.IndexDomain(inclusive_min=[1, 2, 3],
...                         exclusive_max=[6, 7, 8])
>>> transform = ts.IndexTransform(
...     input_rank=4,
...     output=[
...         ts.OutputIndexMap(offset=5, input_dimension=3),
...         ts.OutputIndexMap(offset=-7, input_dimension=0),
...         ts.OutputIndexMap(offset=3, input_dimension=1),
...     ])
>>> domain[transform]
{ [9, 14), [0, 5), (-inf*, +inf*), [-4, 1) }
Parameters:
transform: IndexTransform

Index transform, transform.output_rank must equal self.rank.

Returns:

New domain of rank transform.input_rank.

Note

This is equivalent to composing an identity transform over self with transform, i.e. ts.IndexTransform(self)[transform].domain. Consequently, operations that primarily affect the output index mappings, like integer array indexing, are not very useful, though they are still permitted.