Sorry, hit the wrong key
just an example that I think is not covered by numpy.testing assert
absolute tolerance for `inf`: "assert x and y are allclose or x is large if y is inf"
On Thu, Apr 30, 2015 at 2:24 PM, firstname.lastname@example.org wrote:
def assert_allclose_large(x, y, rtol=1e-6, atol=0, ltol=1e30):
""" assert x and y are allclose or x is large if y is inf
mask_inf = np.isinf(y) & ~np.isinf(x)
assert_allclose(x[~mask_inf], y[~mask_inf], rtol=rtol, atol=atol)