tensorstore.Spec.oindex[self, indices: NumpyIndexingSpec] Spec

Transforms the spec using NumPy-style indexing with outer indexing semantics.

This is similar to __getitem__(indices), but differs in that any integer or boolean array indexing terms are applied orthogonally.

Example

>>> spec = ts.Spec({
...     'driver': 'zarr',
...     'kvstore': {
...         'driver': 'memory'
...     },
...     'transform': {
...         'input_shape': [[70], [80]],
...     }
... })
>>> spec.oindex[[5, 10, 20], [7, 8, 10]]
Spec({
  'driver': 'zarr',
  'kvstore': {'driver': 'memory'},
  'transform': {
    'input_exclusive_max': [3, 3],
    'input_inclusive_min': [0, 0],
    'output': [
      {'index_array': [[5], [10], [20]]},
      {'index_array': [[7, 8, 10]]},
    ],
  },
})
Returns:

New spec with the indexing operation applied.

Raises:

ValueError – If self.transform is None.