weldx.util.compare_nested#

weldx.util.compare_nested(a, b)#

Deeply compares [nested] data structures combined of tuples, lists, dicts…

Also compares non-nested data-structures. Arrays are compared using np.all and xr.DataArray.identical. Sets are compared by calling == and not traversed, hence the order of all set items is important.

Parameters:
Returns:

True, if all elements (including dict keys) of a and b are equal.

Return type:

bool

Raises:

TypeError – When a or b is not a nested structure.