cf.Field.match_by_rank¶
-
Field.
match_by_rank
(*ranks)[source]¶ Whether or not the number of domain axis constructs satisfy conditions.
New in version 3.0.0.
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: bool
Whether 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))