-
tensorstore_demo.IndexDomain.__getitem__(
self, selection: Any) -> IndexDomain Returns a new domain with a subset of the dimensions.
- Parameters:¶
- Raises:¶
ValueError – If any dimension is specified more than once.
Examples
>>> a = ts.IndexDomain(inclusive_min=[1, 2, 3], ... exclusive_max=[4, 5, 6], ... labels=['x', 'y', 'z']) >>> a[:2] { "x": [1, 4), "y": [2, 5) } >>> a[0, -1] { "x": [1, 4), "z": [3, 6) } >>> a['y', 'x'] { "y": [2, 5), "x": [1, 4) } >>> a['y', 1] Traceback (most recent call last): ... ValueError: Input dimensions {1} specified more than once
Last update:
Dec 16, 2024