Is there any reason why the defaults for `allclose` and `assert_allclose`
differ? This makes debugging a broken test much more difficult. More
importantly, using an absolute tolerance of 0 causes failures for some
common cases. For example, if two values are very close to zero, a test
will fail:

    np.testing.assert_allclose(0, 1e-14)

Git blame suggests the change was made in the following commit, but I guess
that change only reverted to the original behavior.

https://github.com/numpy/numpy/commit/f43223479f917e404e724e6a3df27aa701e6d6bf

It seems like the defaults for  `allclose` and `assert_allclose` should
match, and an absolute tolerance of 0 is probably not ideal. I guess this
is a pretty big behavioral change, but the current default for
`assert_allclose` doesn't seem ideal.

Thanks,
-Tony
_______________________________________________
NumPy-Discussion mailing list
NumPy-Discussion@scipy.org
http://mail.scipy.org/mailman/listinfo/numpy-discussion

Reply via email to