- class tensorstore.Schema
Driver-independent options for defining a TensorStore schema.
Constructors¶
- Schema(json: Any)
Constructs from its
JSON representation
.
-
Schema(*, rank: int | None =
None
, dtype: dtype | None =None
, ...) Constructs from component parts.
Mutators¶
Accessors¶
- domain : IndexDomain | None
Domain of the schema, or
None
if unspecified.
- chunk_layout : ChunkLayout
Chunk layout constraints specified by the schema.
- fill_value : ArrayLike | None
Fill value specified by the schema.
- dimension_units : tuple[Unit | None, ...] | None
Physical units of each dimension of the domain.
-
to_json(include_defaults: bool =
False
) Any Converts to the
JSON representation
.
String representation¶
- __repr__() str
Returns a string representation based on the
JSON representation
.
Indexing¶
- __getitem__(transform: IndexTransform) Schema
Transforms the schema using an explicit index transform.
- __getitem__(domain: IndexDomain) Schema
Transforms the schema using an explicit index domain.
- __getitem__(expr: DimExpression) Schema
Transforms the schema using a dimension expression.
- __getitem__(indices: NumpyIndexingSpec) Schema
Transforms the schema using NumPy-style indexing with default index array semantics.
- oindex[indices: NumpyIndexingSpec] Schema
Transforms the schema using NumPy-style indexing with outer indexing semantics.
- vindex[indices: NumpyIndexingSpec] Schema
Transforms the schema using NumPy-style indexing with vectorized indexing semantics.
- translate_to[origins: Sequence[int | None] | int | None] Schema
Returns a new view with
origin
translated to the specified origin.
- translate_by[offsets: Sequence[int | None] | int | None] Schema
Returns a new view with the
origin
translated by the specified offsets.
- translate_backward_by[offsets] Schema
Returns a new view with the
origin
translated backward by the specified offsets.
- mark_bounds_implicit[implicit: bool | None | slice] Schema
Returns a new view with the lower/upper bounds changed to implicit/explicit.
-
transpose(axes: DimSelectionLike | None =
None
) Schema Returns a view with a transposed domain.
Comparison operators¶
- __eq__(other: Schema) bool
Compares with another
Schema
for equality based on theJSON representation
.