class tensorstore_demo.Dim[source]

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


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

See also



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

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

Dim(size: int | None, label: 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].


property exclusive_max : int

Exclusive upper bound of the interval.

property inclusive_min : int

Inclusive lower bound of the interval.

property label : str

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

property size : int

Size of the interval.

Last update: Nov 15, 2022