class tensorstore_demo.Dim[source]

1-d index interval with optionally-implicit bounds and dimension label.

Examples

>>> ts.Dim('x')
Dim(label="x")
>>> ts.Dim(inclusive_min=3, exclusive_max=10, label='x')
Dim(inclusive_min=3, exclusive_max=10, label="x")

See also

IndexDomain

Constructors

Dim(
    
label: str | None = None*implicit_lower: bool = True...
)

Constructs an unbounded interval (-inf, +inf).

Dim(size: int | Nonelabel: str | None = None*...)

Constructs a sized interval [inclusive_min, inclusive_min+size).

Dim(inclusive_min: int | None = -inf...)

Constructs a half-open interval [inclusive_min, exclusive_max).

Dim(*inclusive_min: int | None = -inf...)

Constructs a closed interval [inclusive_min, inclusive_max].

Accessors

property exclusive_maxint

Exclusive upper bound of the interval.

property inclusive_minint

Inclusive lower bound of the interval.

property labelstr

Dimension label, or the empty string to indicate an unlabeled dimension.

property sizeint
property size_aliasint

Size of the interval.


Last update: Dec 16, 2024