[Numpy-discussion] numpy.sign(numpy.nan)?????
Stuart Brorson
sdb@cloud9....
Fri May 16 11:23:49 CDT 2008
Hi guys,
Just a quick note. I've been playing with NumPy again, looking at
corner cases of function evaluation. I noticed this:
In [66]: numpy.sign(numpy.nan)
Out[66]: 0.0
IMO, the output should be NaN, not zero.
If you agree, then I'll be happy to file a bug in the NumPy tracker.
Or if somebody feels like pointing me to the place where this is
implemented, I can submit a patch. (I grepped through the source for
"sign" to see if I could figure it out, but it occurs so frequently
that it will take longer than 5 min to sort it all out.)
Before I did anything, however, I thought I would solicit the opinions
of other folks in the NumPy community about the proper behavior of
numpy.sign(numpy.nan).
Cheers,
Stuart Brorson
Interactive Supercomputing, inc.
135 Beaver Street | Waltham | MA | 02452 | USA
http://www.interactivesupercomputing.com/
More information about the Numpy-discussion
mailing list