GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • tensorstore
  • Tutorial
  • Indexing
  • API reference
  • V inf
  • C IndexDomain
  • C IndexTransform
  • M __init__(components)
  • M __init__(domain)
  • M __init__(json)
  • P domain
  • P input_rank
  • P output_rank
  • P ndim

This view

  • Original page
  • New address

GeezerVison is showing google.github.io — tensorstore.IndexTransform - TensorStore

class tensorstore.IndexTransform

Represents a transform from an input index space to an output space.

The index transform abstraction underlies all indexing operations in the TensorStore library, and enables fully-composable virtual views. For many common use cases cases, however, it does not need to be used directly; instead, it is used indirectly through indexing operations on the TensorStore class and other Indexable types.

See also

  • IndexDomain, which represents the domain of an index transform.

  • The JSON representation.

Constructors¶

IndexTransform(...)

Constructs an index transform from component vectors.

IndexTransform(domain: IndexDomain | Sequence[Dim], ...)

Constructs an index transform from a domain and output index maps.

IndexTransform(*, json: Any)

Constructs an index transform from its JSON representation.

Accessors¶

property domain : IndexDomain

Input domain of the index transform.

property input_rank : int

Rank of the input space.

property output_rank : int

Rank of the output space.

property ndim : int

Rank of the input space, alias for input_rank.

property input_origin : tuple[int, ...]

Inclusive lower bound of the input domain.

property input_inclusive_min : tuple[int, ...]

Inclusive lower bound of the input domain, alias for input_origin.

property input_shape : tuple[int, ...]

Shape of the input domain.

property input_exclusive_max : tuple[int, ...]

Exclusive upper bound of the input domain.

property input_inclusive_max : tuple[int, ...]

Inclusive upper bound of the input domain.

property input_labels : tuple[str, ...]

Dimension labels for each input dimension.

property implicit_lower_bounds : tuple[bool, ...]

Indicates whether the lower bound of each input dimension is implicit or explicit.

property implicit_upper_bounds : tuple[bool, ...]

Indicates whether the upper bound of each input dimension is implicit or explicit.

property output : OutputIndexMaps

Output index maps.

to_json() → Any

Returns the JSON representation of the transform.

property origin : tuple[int, ...]

Inclusive lower bound of the domain.

property shape : tuple[int, ...]

Shape of the domain.

property size : int

Total number of elements in the domain.

Indexing¶

__call__(indices) → tuple[int, ...]

Maps an input index vector to an output index vector.

__getitem__(transform: IndexTransform) → IndexTransform

Composes this index transform with another index transform.

__getitem__(domain: IndexDomain) → IndexTransform

Slices this index transform by another domain.

__getitem__(expr: DimExpression) → IndexTransform

Applies a dimension expression to this transform.

__getitem__(indices: NumpyIndexingSpec) → IndexTransform

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

oindex[indices: NumpyIndexingSpec] → IndexTransform

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

vindex[indices: NumpyIndexingSpec] → IndexTransform

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

property T : IndexTransform

View with transposed domain (reversed dimension order).

translate_to[origins] → IndexTransform

Returns a new view with origin translated to the specified origin.

translate_by[offsets] → IndexTransform

Returns a new view with the origin translated by the specified offsets.

translate_backward_by[offsets] → IndexTransform

Returns a new view with the origin translated backward by the specified offsets.

label[labels: str | Iterable[str]] → IndexTransform

Returns a new view with the dimension labels changed.

mark_bounds_implicit[implicit] → IndexTransform

Returns a new view with the lower/upper bounds changed to implicit/explicit.

transpose(axes: DimSelectionLike | None = None) → IndexTransform

Returns a view with a transposed domain.

String representation¶

__repr__() → str

Returns the string representation.

You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.