cf.Data.equivalent

Data.equivalent(other, rtol=None, atol=None, traceback=False, transpose=None, squeeze=True, use_directions=False)[source]

True if and only if two data arrays are logically equivalent.

Equivalence is defined as both data arrays being the same after accounting for different but equivalent:

  • units
  • size one dimensions (if squeeze is True),
  • dimension directions (if use_directions is True)
  • dimension orders (if transpose is set to a dictionary).
Parameters :

other : Data

transpose : dict, optional

squeeze : bool, optional

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.

use_directions : bool, optional

Returns :
out : bool

Whether or not the two variables are equivalent.

Previous topic

cf.Data.equals

Next topic

cf.Data.expand_dims

This Page