tensorstore.cast(base: Spec, dtype: dtype) Spec

Returns a view with the data type converted.

Example

>>> base = ts.Spec({"driver": "zarr", "kvstore": "memory://"})
>>> view = ts.cast(base, ts.uint32)
>>> view
Spec({
  'base': {'driver': 'zarr', 'kvstore': {'driver': 'memory'}},
  'driver': 'cast',
  'dtype': 'uint32',
})