- class tensorstore_demo.IndexDomain[source]
Domain (including bounds and optional dimension labels) of an N-dimensional index space.
Logically, an
IndexDomain
is the cartesian product of a sequence ofDim
objects.Note
Index domains are immutable, but dimension expressions may be applied using
__getitem__(expr)
to obtain a modified domain.Constructors¶
-
IndexDomain(rank: int | None =
None
, *, ...) Constructs an index domain from component vectors.
- IndexDomain(dimensions: collections.abc.Sequence[Dim])
Constructs an index domain from a :py:class`.Dim` sequence.
- IndexDomain(*, json: Any)
Constructs an index domain from its JSON representation.
Sequence accessors¶
- __getitem__(identifier: int | str) -> Dim
Returns the single dimension specified by
identifier
.
Indexing¶
- __getitem__(selection: Any) -> IndexDomain
Returns a new domain with a subset of the dimensions.
- __getitem__(other: IndexDomain) -> IndexDomain
Slices this domain by another domain.
- __getitem__(expr: DimExpression) -> IndexDomain
Transforms the domain by a dimension expression.
- __getitem__(transform: Any) -> IndexDomain
Transforms the domain using an explicit index transform.
Accessors¶
- property exclusive_max: tuple[int, ...]
Exclusive upper bound of the domain.
- property inclusive_min: tuple[int, ...]
Inclusive lower bound of the domain, alias of
origin
.
-
IndexDomain(rank: int | None =
Last update:
Nov 16, 2024