cf.ne

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

Return an object for testing whether a variable is not equal to the given value.

Parameters :
value : object

The value which a variable is to be compared with.

units : str or cf.Units, optional

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

Returns :
out : cf.Comparison

A cf.Comparison object which will evaluate whether or not the comparison evaluates to True.

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