-
tensorstore.IndexDomain(rank: int | None =
None, *, inclusive_min: Iterable[int] | None =None, implicit_lower_bounds: Iterable[bool] | None =None, exclusive_max: Iterable[int] | None =None, inclusive_max: Iterable[int] | None =None, shape: Iterable[int] | None =None, implicit_upper_bounds: Iterable[bool] | None =None, labels: Iterable[str | None] | None =None) Constructs an index domain from component vectors.
- Parameters:¶
- rank: int | None =
None¶ Number of dimensions. Only required if no other parameter is specified.
- inclusive_min: Iterable[int] | None =
None¶ Inclusive lower bounds for each dimension. If not specified, defaults to all zero if
shapeis specified, otherwise unbounded.- implicit_lower_bounds: Iterable[bool] | None =
None¶ Indicates whether each lower bound is implicit or explicit. Defaults to all explicit if
inclusive_minorshapeis specified, otherwise defaults to all implicit.- exclusive_max: Iterable[int] | None =
None¶ Exclusive upper bounds for each dimension. At most one of
exclusive_max,inclusive_max, andshapemay be specified.- inclusive_max: Iterable[int] | None =
None¶ Inclusive upper bounds for each dimension.
- shape: Iterable[int] | None =
None¶ Size for each dimension.
- implicit_upper_bounds: Iterable[bool] | None =
None¶ Indicates whether each upper bound is implicit or explicit. Defaults to all explicit if
exclusive_max,inclusive_max, orshapeis specified, otherwise defaults to all implicit.- labels: Iterable[str | None] | None =
None¶ Dimension labels. Defaults to all unlabeled.
- rank: int | None =
Examples
>>> ts.IndexDomain(rank=5) { (-inf*, +inf*), (-inf*, +inf*), (-inf*, +inf*), (-inf*, +inf*), (-inf*, +inf*) } >>> ts.IndexDomain(shape=[2, 3]) { [0, 2), [0, 3) }