cf.CoordinateBounds.equals

CoordinateBounds.equals(other, rtol=None, atol=None, ignore_fill_value=False, traceback=False, ignore=())[source]

True if two variables are logically 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 instances differ.

ignore : sequence, optional

Omit these CF properties from the comparison.

Returns:
out : bool

Whether or not the two instances 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

Previous topic

cf.CoordinateBounds.dump

Next topic

cf.CoordinateBounds.expand_dims

This Page