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

Computes a virtual view 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:

>>> dataset = await ts.open(
...     {
...         'driver': 'zarr',
...         'kvstore': {
...             'driver': 'memory'
...         }
...     },
...     dtype=ts.uint32,
...     shape=[60, 70, 80],
...     create=True)
>>> view = dataset.vindex[:, [5, 10, 20], [7, 8, 10]]
>>> view
TensorStore({
  'context': {
    'cache_pool': {},
    'data_copy_concurrency': {},
    'memory_key_value_store': {},
  },
  'driver': 'zarr',
  'dtype': 'uint32',
  'kvstore': {'driver': 'memory'},
  'metadata': {
    'chunks': [60, 70, 80],
    'compressor': {
      'blocksize': 0,
      'clevel': 5,
      'cname': 'lz4',
      'id': 'blosc',
      'shuffle': -1,
    },
    'dimension_separator': '.',
    'dtype': '<u4',
    'fill_value': None,
    'filters': None,
    'order': 'C',
    'shape': [60, 70, 80],
    'zarr_format': 2,
  },
  'transform': {
    'input_exclusive_max': [3, [60]],
    'input_inclusive_min': [0, 0],
    'output': [
      {'input_dimension': 1},
      {'index_array': [[5], [10], [20]]},
      {'index_array': [[7], [8], [10]]},
    ],
  },
})