cast Driver

Virtual read/write view that performs element-wise data type conversion.

  • Reading is supported if the base TensorStore supports reading and conversion from the base data type to the view data type is supported.

  • Writing is supported if the base TensorStore supports writing and conversion from the view data type to the base data type is supported.

The top-level transform, if any, is composed with the TensorStore.transform, if any, specified on base.

json driver/cast : object

Extends

TensorStore

Required members

driver : "cast"
dtype : dtype

Specifies the data type under which to view the base TensorStore.

base : TensorStore

Base TensorStore to convert.

Optional members

context : Context

Specifies context resources that augment/override the parent context.

rank : integer[0, 32]

Specifies the rank of the TensorStore.

If transform is also specified, the input rank must match. Otherwise, the rank constraint applies to the driver directly.

transform : IndexTransform

Specifies a transform.

Example

{
  "driver": "cast",
  "dtype": "int32",
  "base": {"driver": "zarr", "kvstore": {"driver": "gcs", "bucket": "my-bucket"}}
}