pyphi.models.cmp.numpy_aware_eq#
- pyphi.models.cmp.numpy_aware_eq(a, b)[source]#
Return whether two objects are equal via recursion, with float leaves compared up to
EQUALITY_TOLERANCE.Arrays compare via
numpy.allclose(); float scalars viamath.isclose(); sets and frozensets by set equality; mappings by key-set equality with values compared recursively; other ordered iterables element-wise; remaining types via==. Shape-mismatched or non-numeric arrays compare unequal rather than raising.