class tensorstore.d

Specifies a dimension selection, for starting a dimension expression.

A dimension selection specifies a sequence of dimensions, either by index or label.

Dimension selections may be used as part of a dimension expression to specify the dimensions to which an indexing operation applies.

Constructors

d[selection: DimSelectionLike] d

Constructs from a sequence of dimension indices, ranges, and/or labels.

Operations

__getitem__(indices: NumpyIndexingSpec) DimExpression

Applies a NumPy-style indexing operation with default index array semantics.

oindex[indices: NumpyIndexingSpec] DimExpression

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

vindex[indices: NumpyIndexingSpec] DimExpression

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

translate_to[origins] DimExpression

Translates the domains of the selected input dimensions to the specified origins without affecting the output range.

translate_by[offsets] DimExpression

Translates (shifts) the domains of the selected input dimensions by the specified offsets, without affecting the output range.

translate_backward_by[offsets] DimExpression

Translates (shifts) the domains of the selected input dimensions backward by the specified offsets, without affecting the output range.

stride[strides: Sequence[int | None] | int | None] DimExpression

Strides the domains of the selected input dimensions by the specified amounts.

transpose[target: DimSelectionLike] DimExpression

Transposes the selected dimensions to the specified target indices.

label[labels: str | Sequence[str]] DimExpression

Sets (or changes) the labels of the selected dimensions.

diagonal : DimExpression

Extracts the diagonal of the selected dimensions.