[Numpy-discussion] What is the sign of nan?
Charles R Harris
Mon Sep 29 23:14:33 CDT 2008
On Mon, Sep 29, 2008 at 9:54 PM, David Cournapeau <
> Charles R Harris wrote:
> > On Mon, Sep 29, 2008 at 9:02 PM, David Cournapeau
> > <firstname.lastname@example.org <mailto:email@example.com>>
> > wrote:
> > Charles R Harris wrote:
> > >
> > > So the proposition is, sign, max, min return nan when any of the
> > > arguments is nan.
> > Note that internally, signbit (the C function) returns an integer.
> > That is the signature of the ufunc. It could be changed...
> Nope, I am talking about the C99 signbit macro. man signbit tells me:
> signbit - test sign of a real floating point number
> #include <math.h>
> int signbit(x);
> Compile with -std=c99; link with -lm.
Yes, that too. But I was thinking of the ufunc returning nan when needed.
However, I think -1 is the way to go for that to get minimal breakage.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Numpy-discussion