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

Stéfan van der Walt stefan at sun.ac.za
Wed Oct 2 15:43:38 EDT 2013


On 2 Oct 2013 21:19, "Charles R Harris" <charlesr.harris at gmail.com> wrote:
>
>
> The main problem I had was deciding what arg{max, min} should return as
the return value is an integer. I like your suggestion of returning 0.

This doesn't allow the user to know the difference between valid and"
invalid" output, does it?

> One further possibility is to add a keyword 'raise' to make the behavior
selectable.

Preferably just pick a sensible default.

Stéfan
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/numpy-discussion/attachments/20131002/4e2efc66/attachment.html>


More information about the NumPy-Discussion mailing list