cfdm.RaggedContiguousArray.get_compressed_dimension

RaggedContiguousArray.get_compressed_dimension(default=ValueError())[source]

Returns the compressed dimension’s position in the array.

New in version (cfdm): 1.7.0

Parameters
default: optional

Return the value of the default parameter if the underlying array is not compressed. If set to an Exception instance then it will be raised instead.

Returns
int

The position of the compressed dimension in the compressed array. If the underlying is not compressed then default is returned, if provided.

Examples

>>> i = d.get_compressed_dimension()