Skip to content
TensorStore
tensorstore.IndexTransform.label
Initializing search
    tensorstore
    tensorstore
      • Tutorial
      • Indexing
      • API reference
        • Core
        • Indexing
          • V inf
          • C IndexDomain
          • C IndexTransform
            • Constructors
            • Accessors
            • Indexing
              • M __call__
              • M __getitem__(transform)
              • M __getitem__(domain)
              • M __getitem__(expr)
              • M __getitem__(indices)
              • M oindex
              • M vindex
              • P T
              • M translate_to
              • M translate_by
              • M translate_backward_by
              • M label
                • Parameters
                  • p labels
                • Raises
              • M mark_bounds_implicit
              • M transpose
            • String representation
          • C Dim
          • C OutputIndexMap
          • C OutputIndexMaps
          • C OutputIndexMethod
          • C DimExpression
          • C d
          • V newaxis
          • C Indexable
        • Spec
        • Views
        • Data types
        • Asynchronous support
        • OCDBT
        • Experimental
      • API reference
      • Building and Installing
      • Environment variables
      • JSON Spec
      • Index space
      • Schema
      • Context framework
      • Drivers
      • Key-Value Storage Layer
    • Parameters
      • p labels
    • Raises
    tensorstore.IndexTransform.label[self, labels: str | Sequence[str]] → IndexTransform

    Returns a new view with the dimension labels changed.

    This is equivalent to self[ts.d[:].label[labels]].

    Parameters:¶
    labels: str | Sequence[str]¶

    Dimension labels for each dimension.

    Raises:¶

    IndexError – If the number of labels does not match the number of dimensions, or if the resultant domain would have duplicate labels.

    See also

    • tensorstore.DimExpression.label