[Numpy-discussion] np.testing.assert_equal

Keith Goodman kwgoodman@gmail....
Fri Jan 22 11:11:14 CST 2010


Should

np.testing.assert_equal(np.array(1), 1)

raise an AssertionError? (It currently doesn't.)

The use case I have in mind is that scipy.stats.nanamedian incorrectly
returns np.array(1.0) for the median of a 1d array while np.median
correctly returns 1.0. It would be handy if the assert statement
caught the difference.


More information about the NumPy-Discussion mailing list