cf.Domain.equals

Domain.equals(other, rtol=None, atol=None, traceback=False)[source]

True if two domains are equal, False otherwise.

Equality is defined as follows:

  • There is one-to-one correspondence between dimensions and dimension sizes between the two domains.
  • For each domain component type (dimension coordinate, auxiliary coordinate and cell measures), the set of constructs in one domain equals that of the other domain. The component identifiers need not be the same.
  • The set of transforms in one domain equals that of the other domain. The transform identifiers need not be the same.

Equality of numbers is to within a tolerance.

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.

traceback : bool, optional

If True then print a traceback highlighting where the two instances differ.

Returns :
out : bool

Whether or not the two instances are equal.

Examples

>>> d.equals(s)
True
>>> d.equals(t)
False
>>> d.equals(t, traceback=True)

Previous topic

cf.Domain.dump

Next topic

cf.Domain.expand_dims

This Page