class tensorstore.Dim

Index interval with optionally-implicit bounds and dimension label.

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


__init__(self, label, implicit_lower, …)

Constructs an unbounded interval.

__init__(self, size, label, implicit_lower, …)

Constructs the interval [0, size).

__init__(self, inclusive_min, exclusive_max, …)

Constructs a half-open interval.

__init__(self, inclusive_min, inclusive_max, …)

Constructs a closed interval.

__init__(self, inclusive_min, size, label, …)

Constructs a sized interval.


empty: bool

Returns True if size is zero.

exclusive_max: int

Returns the exclusive upper bound of the interval

exclusive_min: int

Returns the exclusive lower bound of the interval

finite: bool

Returns True if the interval is finite.

implicit_lower: bool

Indicates if the lower bound is “implicit”.

implicit_upper: bool

Indicates if the upper bound is “implicit”.

inclusive_max: int

Returns the inclusive upper bound of the interval

inclusive_min: int

Returns the inclusive lower bound of the interval

label: str

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

size: int

Returns the size of the interval