cf.GatheredArray.subarray_shapes¶

GatheredArray.
subarray_shapes
(shapes)[source]¶ Create the subarray shapes along each uncompressed dimension.
New in version (cfdm): 1.10.0.0
See also
subarray
 Parameters
 chunks:
int
, sequence,dict
orstr
, 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 noncompressed dimensions in each subarray have the maximum possible size.
 chunks:
 Returns
list
The subarray sizes along each uncompressed dimension.
Examples
>>> a.shape (2, 3, 4) >>> a.compressed_dimensions() {0: (0, 1)} >>> a.subarray_shapes(1) [(2,), (3,), (4,)] >>> a.subarray_shapes("auto") [(2,), (3,), "auto"] >>> a.subarray_shapes(2) [(2,), (3,), 2] >>> a.subarray_shapes("60B") [(2,), (3,), "60B"] >>> a.subarray_shapes((None, None, 2)) [(2,), (3,), 2] >>> a.subarray_shapes((None, None, (1, 3))) [(2,), (3,), (1, 3)] >>> a.subarray_shapes((None, None, "auto")) [(2,), (3,), "auto"] >>> a.subarray_shapes((None, None, "60B")) [(2,), (3,), "60B"] >>> a.subarray_shapes({2: (1, 3)}) [(2,), (3,), (1, 3)]
>>> import dask.array as da >>> da.core.normalize_chunks( ... a.subarray_shapes("auto"), shape=a.shape, dtype=a.dtype ... ) [(2,), (3,), (4,)] >>> da.core.normalize_chunks( ... a.subarray_shapes(2, shape=a.shape, dtype=a.dtype ... ) [(2,), (3,), (2, 2)]