tensorstore.Spec.transform : IndexTransform | None

The index transform, or None if unspecified.

Example

>>> spec = ts.Spec({'driver': 'n5', 'kvstore': {'driver': 'memory'}})
>>> print(spec.transform)
None
>>> spec = ts.Spec({
...     'driver': 'n5',
...     'kvstore': {
...         'driver': 'memory'
...     },
...     'metadata': {
...         'dimensions': [100, 200],
...         'axes': ['x', 'y']
...     }
... })
>>> spec.transform
Rank 2 -> 2 index space transform:
  Input domain:
    0: [0, 100*) "x"
    1: [0, 200*) "y"
  Output index maps:
    out[0] = 0 + 1 * in[0]
    out[1] = 0 + 1 * in[1]
>>> spec[ts.d['x'].translate_by[5]].transform
Rank 2 -> 2 index space transform:
  Input domain:
    0: [5, 105*) "x"
    1: [0, 200*) "y"
  Output index maps:
    out[0] = -5 + 1 * in[0]
    out[1] = 0 + 1 * in[1]