array Driver

The array driver specifies a TensorStore backed by a contiguous in-memory array.

When specified via JSON, this driver is useful for specifying small, constant arrays.

When used from the C++ or Python API, this driver adapts an existing in-memory array for use as a TensorStore.

json driver/array : object

Extends

TensorStore

Required members

driver : "array"
dtype : dtype

Specifies the data type.

array

Nested array of rank equal to rank specifying the initial value.

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": "array", "array": [[1, 2, 3], [4, 5, 6]], "dtype": "int32"}