tensorstore.Schema.vindex[self, indices: NumpyIndexingSpec] Schema

Transforms the schema using NumPy-style indexing with vectorized indexing semantics.

This is similar to __getitem__(indices), but differs in that if indices specifies any array indexing terms, the broadcasted array dimensions are unconditionally added as the first dimensions of the result domain.

Example

>>> schema = ts.Schema(
...     domain=ts.IndexDomain(labels=['x', 'y', 'z'],
...                           shape=[1000, 2000, 3000]),
...     chunk_layout=ts.ChunkLayout(grid_origin=[100, 200, 300],
...                                 inner_order=[0, 1, 2]),
... )
>>> schema.vindex[[5, 10, 20], [7, 8, 10]]
Schema({
  'chunk_layout': {'grid_origin': [None, 300], 'inner_order': [1, 0]},
  'domain': {
    'exclusive_max': [3, 3000],
    'inclusive_min': [0, 0],
    'labels': ['', 'z'],
  },
  'rank': 2,
})
Returns:

New schema with the indexing operation applied.

Raises:

ValueError – If self.rank is None.