Closed
Description
In Python, the NumPy library provides nice array-comparison functions for unit tests etc., which I make heavy use of:
import numpy as np
a = np.arange(5, dtype=np.float32) + 1
np.testing.assert_allclose(a, 1e-10 + np.sqrt(a**2)) # Succeeds.
np.testing.assert_allclose(a, 1e-1 + np.sqrt(a**2)) # Fails.
Would it be useful/appropriate to add some of these to this library? I could be interested in working on it, but thought I'd check first.
(Seems like some such functions are used internally, but don't seem to be exported for external use.)