[Numpy-discussion] numpy.sign(numpy.nan)?????

Stuart Brorson sdb at cloud9.net
Sat May 17 07:55:24 EDT 2008


>> In [66]: numpy.sign(numpy.nan)
>> Out[66]: 0.0
>>
>> IMO, the output should be NaN, not zero.

> The implementation is actually in a #define macro in
> umathmodule.c.src. Look for _SIGN1 (and _SIGNC if you want to clean up
> the complex versions, too).

OK, I submitted a patch.  #794 in the tracker.

Stuart Brorson
Interactive Supercomputing, inc.
135 Beaver Street | Waltham | MA | 02452 | USA
http://www.interactivesupercomputing.com



More information about the NumPy-Discussion mailing list