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:
a (
Union[Sequence,Mapping,Collection,Set]) – a [nested] data structure to compare tob.b (
Union[Sequence,Mapping,Collection,Set]) – a [nested] data structure to compare toa.
- Returns:
True, if all elements (including dict keys) of a and b are equal.
- Return type:
- Raises:
TypeError – When a or b is not a nested structure.