-
-
Notifications
You must be signed in to change notification settings - Fork 18.2k
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
MAINT: Remove np.int_
and np.uint
#55369
Conversation
c755e00
to
0ea5e62
Compare
0ea5e62
to
9e65df2
Compare
np_long = np.int_ | ||
np_ulong = np.uint | ||
else: | ||
np_long = np.int_ |
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.
So just for my understanding, np.long
was newly added to the top level namespace/didn't exist before a certain version? It would be preferable to already use np.long/np.ulong
if possible
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.
That's correct - np.long
and np.ulong
throw AttributeError
in existing numpy versions - these will be new members of the main namespace (I think np.long
existed for some time a long time ago).
Thanks again @mtsokol |
I think I need to add one warning filter, similar to scipy scipy/scipy#19341 that I did today - in case you experience failures with the current numpy nightly. |
This reverts commit 4976b69.
These changes should be reverted in #55505, and also reverse-backported to 2.1.x. |
Hi!
This PR addresses changes that will be shipped in numpy/numpy#24794 - deprecation of
np.int_
andnp.uint
. An explanation of changes:np.int_(value)
was used I replaced it with backward compatiblenp_long(value)
.np.int_
withnp.dtype(int)
(they are equivalent).dtype=
arguments I usedint
for conciseness.