cf.eq

cf.eq(value)

Create a Comparison object for evaluating whether a variable is equal to the given value.

Parameters:value (object) – The value which a variable is to be compared with.
Returns:A Comparison object which will evaluate whether or not the comparison evaluates to True.

Examples:

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

Previous topic

cf.RTOL

Next topic

cf.ne

This Page