cf.ne

cf.ne(value, units=None, regex=False, attr=None)[source]

Return a comparison object for a variable for being equal to a value.

Parameters :
value : object

The value which a variable is to be compared with.

units : str or cf.Units, optional

The units of value. By default, the same units as the variable being tested are assumed, if applicable.

regex : str, optional

If True then string values are to be treated as regular expressions, which are evaluated using the re.search function..

Returns :
out : cf.Comparison

The comparison object.

See also

eq, ge, gt, le, lt, set, wi, wo

Examples

>>> c = cf.ne(5)
>>> c
<CF Comparison: x ne 5>
>>> c.evaluate(4)
True
>>> c.evaluate(5)
False

Previous topic

cf.lt

Next topic

cf.set

This Page