Skip to content
TensorStore
tensorstore.IndexTransform.__call__
Initializing search
    tensorstore
    tensorstore
      • Tutorial
      • Indexing
      • API reference
        • Core
        • Indexing
          • V inf
          • C IndexDomain
          • C IndexTransform
            • Constructors
            • Accessors
            • Indexing
              • M __call__
                • Parameters
                  • p indices
                • Returns
              • 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
              • M mark_bounds_implicit
              • M transpose
            • String representation
          • C Dim
          • C OutputIndexMap
          • C OutputIndexMaps
          • C OutputIndexMethod
          • C DimExpression
          • C DimSelection
          • M d
          • V newaxis
          • C Indexable
          • V NumpyIndexTerm
          • V NumpyIndexingSpec
          • V DimSelectionLike
        • 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 indices
    • Returns
    tensorstore.IndexTransform.__call__(self, indices: Iterable[SupportsInt]) → tuple[int, ...]

    Maps an input index vector to an output index vector.

    Parameters:¶
    indices: Iterable[SupportsInt]¶

    Input vector of length input_rank.

    Returns:¶

    Output vector of length output_rank.

    Examples

    >>> transform = ts.IndexTransform(2)[ts.d[:].translate_by[1, 2]]
    >>> transform([0, 0])
    (-1, -2)
    >>> transform([1, 2])
    (0, 0)