True if and only if two objects are logically equivalent.
If the first argument, x, has an equivalent method then it is used, and in this case equivalent(x, y) is the same as x.equivalent(y).
Parameters : |
|
---|---|
Returns : |
|
Examples
>>> f
<CF Field: rainfall_rate(latitude(10), longitude(20)) kg m2 s-1>
>>> cf.equivalent(f, f)
True
>>> cf.equivalent(1.0, 1.0)
True
>>> cf.equivalent(1.0, 33)
False
>>> cf.equivalent('a', 'a')
True
>>> cf.equivalent('a', 'b')
False
>>> cf.equivalent(cf.Data(1000, units='m'), cf.Data(1, units='km'))
True
For a field, f:
>>> cf.equivalent(f, f.transpose())
True