cf.Field.match_by_rank¶
-
Field.match_by_rank(*ranks)[source]¶ Whether or not the number of domain axis constructs satisfies conditions.
New in version 3.0.0.
See also
match,match_by_property,match_by_identity,match_by_ncvar,match_by_units,match_by_construct- Parameters
- ranks: optional
Define conditions on the number of domain axis constructs.
A condition is one of:
The condition is satisfied if the number of domain axis constructs equals the condition value.
- Parameter example:
To see if the field construct has 4 domain axis constructs:
4- Parameter example:
To see if the field construct has at least 3 domain axis constructs:
cf.ge(3)
- Returns
boolWhether or not at least one of the conditions are met.
Examples:
>>> f.match_by_rank(3, 4)
>>> f.match_by_rank(cf.wi(2, 4))
>>> f.match_by_rank(1, cf.gt(3))