-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
[numpy] Update NPY201: add np.NAN
to exception
#12292
Conversation
@@ -68,3 +68,5 @@ def func(): | |||
np.longfloat(12+34j) | |||
|
|||
np.lookfor | |||
|
|||
np.NAN |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this could also be moved next to np.NaN
- which i'd find more appealing as it'd really belong there - but i found the diff on the .snap file to be rather large - as it changes all subsequent line numbers...
let me know if you'd prefer that
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think either is fine.
That makes sense. I think that's best tackled as a separate pr |
np.NAN
to exception
Thank you! |
Summary
np.NAN was also deprecated / removed, as reported in #12195.
Personally, i'd also wan't to have warnings for
from numpy import nan, NaN, NAN
(NAN and NaN shouldn't import as they've been removed) - but that's really out of my league - as there's no similar case at the moment (at least not in the NPY201 section).Obviously, this would "also" apply to essentially all other cases of deprecations.
Test Plan
Added testcase, manual test