Evaluate the comparison operation for a given object.
Note that for the comparison object c and any object, x, x==c is equivalent to c.evaluate(x) and x!=c is equivalent to c.evaluate(x)==False.
Parameters : |
|
---|---|
Returns : |
|
Examples
>>> c = cf.Comparison('lt', 5.5)
>>> c.evaluate(6)
False
>>> c = cf.Comparison('wi', (1,2))
>>> array = numpy.arange(4)
>>> array
array([0, 1, 2, 3])
>>> c.evaluate(array)
array([False, True, True, False], dtype=bool)