https://github.com/numpy/numpy/issues/10161#issuecomment-350...
plus a ton of flogging/benchmarking common libraries (numpy, scipy, scikit-learn) and discussion about np.isclose()
... and also this gem:
import numpy as np a = 1 b = 10 rtol = 1 atol = 0 np.isclose(a, b, rtol=rtol, atol=atol) # True np.isclose(b, a, rtol=rtol, atol=atol) # False
import math math.isclose(a, b, rel_tol=rtol, abs_tol=atol) # True math.isclose(b, a, rel_tol=rtol, abs_tol=atol) # True