tensorstore.Spec.schema : Schema

Effective schema, including any constraints implied by driver-specific options.

Example

>>> spec = ts.Spec({
...     'driver': 'zarr',
...     'kvstore': {
...         'driver': 'memory'
...     },
...     'metadata': {
...         'dtype': '<u2',
...         'chunks': [100, 200, 300],
...         'shape': [1000, 2000, 3000],
...         'order': 'C'
...     }
... })
>>> spec.schema
Schema({
  'chunk_layout': {
    'grid_origin': [0, 0, 0],
    'inner_order': [0, 1, 2],
    'read_chunk': {'shape': [100, 200, 300]},
    'write_chunk': {'shape': [100, 200, 300]},
  },
  'codec': {'driver': 'zarr'},
  'domain': {
    'exclusive_max': [[1000], [2000], [3000]],
    'inclusive_min': [0, 0, 0],
  },
  'dtype': 'uint16',
  'rank': 3,
})

Note

This does not perform any I/O. Only directly-specified constraints are included.