[Numpy-discussion] What is the sign of nan?

Charles R Harris charlesr.harris at gmail.com
Mon Sep 29 18:13:27 EDT 2008


On Mon, Sep 29, 2008 at 3:52 PM, Charles R Harris <charlesr.harris at gmail.com
> wrote:

> Hi All,
>
> I've been cleaning up the ufunc loops and the sign function currently
> doesn't have a defined behavior for nans. This makes the results depend on
> the order/type of comparisons in the code, which looks fragile to me. So
> what should it return? I vote for nan but am open for suggestions.
>

And while we're at it, lets decide how to treat max/min when nans are
involved. Or should we just say the behavior is undefined.

Chuck
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/numpy-discussion/attachments/20080929/581947af/attachment.html>


More information about the NumPy-Discussion mailing list