cf.SubsampledArray.subarray_shapes

SubsampledArray.subarray_shapes(shapes)[source]

Create the subarray shapes along each uncompressed dimension.

Added in version (cfdm): 1.10.0.0

See also

subarray

Parameters:
chunks: int, sequence, dict or str, optional

Define the subarray shapes.

Any value accepted by the chunks parameter of the dask.array.from_array function is allowed.

The subarray sizes implied by chunks for a dimension that has been compressed are ignored and replaced with values that are implied by the decompression algorithm, so their specification is arbitrary.

By default, chunks is -1, meaning that all non-compressed dimensions in each subarray have the maximum possible size.

Returns:
list

The subarray sizes along each uncompressed dimension.

>>> a.shape
(4, 20, 30)
>>> a.compressed_dimensions()
{1: (1,), 2: (2,)}
>>> a.subarray_shapes(-1)
[(4,), None, None]
>>> a.subarray_shapes("auto")
["auto", None, None]
>>> a.subarray_shapes(2)
[2, None, None]
>>> a.subarray_shapes("60B")
["60B", None, None]
>>> a.subarray_shapes((2, None, None))
[2, None, None]
>>> a.subarray_shapes(((1, 3), None, None))
[(1, 3), None, None]
>>> a.subarray_shapes(("auto", None, None))
["auto", None, None]
>>> a.subarray_shapes(("60B", None, None))
["60B", None, None]