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

Stuart Brorson sdb@cloud9....
Sat May 17 06:55:24 CDT 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