I'm getting some test failures in my code with infs

in numpy 1.4, nan treatment has been corrected in numpy.testing

>>> assert_almost_equal(np.array([-5.23722324, -np.nan, -5.23722324]), 
>>> np.array([-5.23722324, -np.nan, -5.23722324]))

but it seems that inf doesn't compare almost equal

>>> assert_almost_equal(np.array([-5.23722324, -np.inf, -5.23722324]), 
>>> np.array([-5.23722324, -np.inf, -5.23722324]))
Traceback (most recent call last):
...
ValueError:
Arrays are not almost equal
 x: array([-5.23722324,        -Inf, -5.23722324])
 y: array([-5.23722324,        -Inf, -5.23722324])


numpy 1.4.0

has this been changed already? or is it not desired?

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

Reply via email to