tensorstore.Spec.rank : int | None

Returns the rank of the domain, or None if unspecified.

Example

>>> spec = ts.Spec({'driver': 'n5', 'kvstore': {'driver': 'memory'}})
>>> print(spec.rank)
None
>>> spec = ts.Spec({
...     'driver': 'n5',
...     'kvstore': {
...         'driver': 'memory'
...     },
...     'metadata': {
...         'dimensions': [100, 200]
...     }
... })
>>> spec.rank
2