[Numpy-discussion] Behavior of nan{max, min} and nanarg{max, min} for all-nan slices.

Nathaniel Smith njs at pobox.com
Wed Oct 2 12:09:40 EDT 2013


+1 to making the nan functions consistent with the non-nan functions.
On 2 Oct 2013 17:03, "Charles R Harris" <charlesr.harris at gmail.com> wrote:

> Hi All,
>
> The question is what to do when all-nan slices are encountered in the
> nan{max,min} and nanarg{max, min} functions. Currently in 1.8.0, the first
> returns nan and raises a warning, the second returns intp.min and raises a
> warning. It is proposed that the nanarg{max, min} functions, and possibly
> the nan{max, min} also, raise an error instead. Raising errors would be
> consistent with the behavior of the arg{max, min} and amax/amin functions
> when they encounter empty arrays. OTOH, now that we no longer support
> Python 2.4/2.5 the catch_warnings context manager can serve the same
> purpose by changing the warnings into exceptions. So, what to do?
>
> Thoughts?
>
> Chuck
>
> _______________________________________________
> NumPy-Discussion mailing list
> NumPy-Discussion at scipy.org
> http://mail.scipy.org/mailman/listinfo/numpy-discussion
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/numpy-discussion/attachments/20131002/ee0aee21/attachment.html>


More information about the NumPy-Discussion mailing list