cf.BoundsFromNodesArray.subarray_shapes

BoundsFromNodesArray.subarray_shapes(shapes)[source]

Create the subarray shapes along each uncompressed dimension.

Note that the output is independent of the shapes parameter, because each dimension of the compressed data corresponds to a unique dimension of the uncompressed data.

Added in version (cfdm): 1.11.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.

Examples

>>> a.shape
(4, 4)
>>> a.compressed_dimensions()
{0: (0,), 1: (1,)}
>>> a.subarray_shapes(-1)
[(4,), (4)]
>>> a.subarray_shapes("auto")
[(4,), (4)]
>>> a.subarray_shapes("60B")
[(4,), (4)]