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— Specifies a TensorStore to open/create.
- Optional members:¶
-
-
rank : integer[
0,32]¶ Specifies the rank of the TensorStore.
If
transformis also specified, the input rank must match. Otherwise, the rank constraint applies to the driver directly.
- transform : IndexTransform¶
Specifies a transform.
- schema : Schema¶
Specifies constraints on the schema.
When opening an existing array, specifies constraints on the existing schema; opening will fail if the constraints do not match. Any soft constraints specified in the
chunk_layoutare ignored. When creating a new array, a suitable schema will be selected automatically based on the specified schema constraints in combination with any driver-specific constraints.
-
data_copy_concurrency : ContextResource =
"data_copy_concurrency"¶ Specifies or references a previously defined
Context.data_copy_concurrency. It is normally more convenient to specify a defaultdata_copy_concurrencyin thecontext.
-
rank : integer[
Example
{"driver": "array", "array": [[1, 2, 3], [4, 5, 6]], "dtype": "int32"}