# cf.Data.equals¶

Data.equals(other, rtol=None, atol=None, ignore_fill_value=False, ignore_data_type=False, ignore_type=False, verbose=None, traceback=False, ignore_compression=False)[source]

True if two data arrays are logically equal, False otherwise.

Two real numbers x and y are considered equal if |x-y|<=atol+rtol|y|, where atol (the tolerance on absolute differences) and rtol (the tolerance on relative differences) are positive, typically very small numbers. See the atol and rtol parameters.

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 ATOL function is used.

rtol: float, optional

The relative tolerance for all numerical comparisons. By default the value returned by the 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.

verbose: int or None, optional

If an integer from 0 to 3, corresponding to increasing verbosity (else -1 as a special case of maximal and extreme verbosity), set for the duration of the method call (only) as the minimum severity level cut-off of displayed log messages, regardless of the global configured cf.LOG_LEVEL.

Else, if None (the default value), log messages will be filtered out, or otherwise, according to the value of the cf.LOG_LEVEL setting.

Overall, the higher a non-negative integer that is set (up to a maximum of 3) the more description that is printed to convey information about differences that lead to inequality.

traceback: deprecated at version 3.0.0

bool
>>> d.equals(d)