tensorstore.TensorStore.astype(self, dtype: dtype) TensorStore

Returns a read/write view as the specified data type.

Example

>>> store = ts.array([1, 2, 3], dtype=ts.uint32)
>>> store.astype(ts.string)
TensorStore({
  'base': {'array': [1, 2, 3], 'driver': 'array', 'dtype': 'uint32'},
  'context': {'data_copy_concurrency': {}},
  'driver': 'cast',
  'dtype': 'string',
  'transform': {'input_exclusive_max': [3], 'input_inclusive_min': [0]},
})