Hi --
>> In [66]: numpy.sign(numpy.nan)
>> Out[66]: 0.0
>>
>> IMO, the output should be NaN, not zero.
> You're probably right. I would like to see what other systems do
> before changing it, though.
Here's what Matlab does:
>> A = nan
A =
NaN
>> sign(A)
ans =
NaN
>> B = [1, nan]
B =
1 NaN
>> sign(B)
ans =
1 NaN
Cheers,
Stuart Brorson
Interactive Supercomputing, inc.
135 Beaver Street | Waltham | MA | 02452 | USA
http://www.interactivesupercomputing.com/
_______________________________________________
Numpy-discussion mailing list
[email protected]
http://projects.scipy.org/mailman/listinfo/numpy-discussion