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

Applies a NumPy-style indexing operation with vectorized indexing semantics.

This is similar to DimExpression.__getitem__, 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:

Examples

>>> transform = ts.IndexTransform(input_labels=['x', 'y', 'z'])
>>> transform[ts.d['y', 'z'].vindex[[1, 2, 3], [4, 5, 6]]]
Rank 2 -> 3 index space transform:
  Input domain:
    0: [0, 3)
    1: (-inf*, +inf*) "x"
  Output index maps:
    out[0] = 0 + 1 * in[1]
    out[1] = 0 + 1 * bounded((-inf, +inf), array(in)), where array =
      {{1}, {2}, {3}}
    out[2] = 0 + 1 * bounded((-inf, +inf), array(in)), where array =
      {{4}, {5}, {6}}
Returns:

Dimension expression with the indexing operation added.