cf.CellMeasure.equals¶
-
CellMeasure.
equals
(other, rtol=None, atol=None, ignore_fill_value=False, traceback=False, ignore=())[source]¶ True if two cell measures are equal, False otherwise.
Parameters: - other :
The object to compare for equality.
- atol:
float
, optional The absolute tolerance for all numerical comparisons, By default the value returned by the
cf.ATOL
function is used.- rtol:
float
, optional The relative tolerance for all numerical comparisons, By default the value returned by the
cf.RTOL
function is used.- ignore_fill_value : bool, optional
If True then data arrays with different fill values are considered equal. By default they are considered unequal.
- traceback : bool, optional
If True then print a traceback highlighting where the two cell measures differ.
- ignore : tuple, optional
The names of CF properties to omit from the comparison.
Returns: - out : bool
Whether or not the two cell measures are equal.
Examples: >>> f.equals(f) True >>> g = f + 1 >>> f.equals(g) False >>> g -= 1 >>> f.equals(g) True >>> f.setprop('name', 'name0') >>> g.setprop('name', 'name1') >>> f.equals(g) False >>> f.equals(g, ignore=['name']) True