[Numpy-discussion] bug with numpy nanargmax/nanargmin

Dmitrey tmp50 at ukr.net
Tue Apr 5 05:33:54 EDT 2011

 >>> from numpy import *
   >>> nanargmax([nan,nan])
   nan # ok
   >>> nanargmax([nan,nan],0)
   nan # ok
   >>> nanargmax([[1,nan],[1,nan]],0)
   Traceback (most recent call last):
   File "<stdin>", line 1, in <module>
   line 1606, in nanargmax
   return _nanop(np.argmax, -np.inf, a, axis)
   line 1346, in _nanop
   res[mask_all_along_axis] = np.nan
   ValueError: cannot convert float NaN to integer
   >>> __version__

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/numpy-discussion/attachments/20110405/48614f97/attachment.html>

More information about the NumPy-Discussion mailing list