cf.Count.match_by_naxes

Count.match_by_naxes(*naxes)[source]

Whether or not the data has a given dimensionality.

New in version 3.0.0.

Parameters
naxes: optional

Dimensionalities to be compared.

A dimensionality given by an int or a Query object.

If no numbers are provided then there is always a match.

Returns
bool

Whether or not there is a match.

Examples

>>> f.ndim
3
>>> f.match_by_naxes(3)
True
>>> f.match_by_naxes(cf.ge(1))
True
>>> f.match_by_naxes(1, 2, 3)
True
>>> f.match_by_naxes(2)
False
>>> f.match_by_naxes(cf.gt(3))
False