Charles R Harris
Fri Jan 22 11:35:10 CST 2010
On Fri, Jan 22, 2010 at 10:11 AM, Keith Goodman <email@example.com> wrote:
> 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.
Such a change would break most of the current tests. The current form was
chosen to be convenient for most use cases. If you need to check the return
type, then you can write another helper function or use assert_ to combine
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the NumPy-Discussion