cf.wo

cf.wo(value0, value1, units=None, attr=None)[source]

A Query object for a “without a range” condition.

Parameters:
value0:

The lower bound of the range.

value1:

The upper bound of the range.

units: str or Units, optional

The units of value. By default, the same units as the operand being tested are assumed, if applicable. If units is specified and the already value has units (such as a Data object`), then they must be equivalent.

attr: str, optional

Apply the condition to the attribute, or nested attributes, of the operand, rather than the operand itself. Nested attributes are specified by separating them with a .. For example, the “month” attribute of the “bounds” attribute is specified as 'bounds.month'.

units: str or Units, optional

The units of value. By default, the same units as the operand being tested are assumed, if applicable. If units is set and the value has units (such as a Data object`), then they must be equivalent.

attr: str, optional

Return a query object for a variable’s attr attribute.

Returns:
Query

The query object.

Examples:

>>> q = cf.wo(5)
>>> q
<CF Query: x wo (5, 7)>
>>> q.evaluate(4)
True
>>> q.evaluate(6)
False