-
-
Notifications
You must be signed in to change notification settings - Fork 10.9k
Patch to fix behavior of numpy.sign(numpy.nan) (Trac #794) #1392
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
@charris wrote on 2008-05-17 I will fix this in 1.2, not sooner. I have cleanups on queue for umathmodule and I don't want to complicate the merge. |
Attachment added by trac user brorson on 2008-05-17: NumPy_NAN.diff |
Milestone changed to |
@charris wrote on 2008-07-20 Applied, but NAN doesn't work on MSVC. I replaced it with x when isnan(x) tested true. |
@charris wrote on 2008-07-21 This patch requires fixing some conversions of NaN to at least integer types. I've reverted the fix until all the implications can be worked out. |
@cournape wrote on 2009-03-02 Will you have time to look at it for 1.3.0 ? If not, change to what you think is best |
@charris wrote on 2009-03-10 IIRC, there was some discussion of what should be returned as the sign of nan. Currently it is zero for all inexact types. We could also return the sign bit, or just return nan. Maybe we should bring this up on the list again. |
@charris wrote on 2009-03-10 As of r6621,r6624 the sign of real or complex nans is nan. |
Original ticket http://projects.scipy.org/numpy/ticket/794 on 2008-05-17 by trac user brorson, assigned to @charris.
As was discussed on numpy-discuss earlier today, I am submitting a patch to fix the behavior of numpy.sign(numpy.nan). With this patch, the following behavior obtains:
Cheers,
Stuart Brorson[[BR]]
Interactive Supercomputing, inc.[[BR]]
135 Beaver Street | Waltham | MA | 02452 | USA[[BR]]
http://www.interactivesupercomputing.com/[[BR]]
The text was updated successfully, but these errors were encountered: