-
tensorstore_demo.IndexDomain.__getitem__(
self, transform: Any) -> 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) }
Note
This is equivalent to composing an identity transform over
self
withtransform
, 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.
Last update:
Dec 16, 2024