-
Notifications
You must be signed in to change notification settings - Fork 908
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
Minor fixups for future NumPy 2 compatibility #15590
Conversation
The alternative is listing them all, but even that is a bit tedious for integers, because it needs something like: ``(np.byte, np.short, np.intc, getattr(np, "long", np.int_), np.longlong)``
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.
We could rather drop the np.unicode_
from our code instead of duplicating with np.str_
because all tests have this covered.
Co-authored-by: GALI PREM SAGAR <[email protected]>
Yeah good point, should have noticed that it was just duplicating the tests. |
/merge |
These are some small fixes to be compatible with NumPy 2 python changes, as pointed out by the
ruff
with the"NPY201"
rule-set.I am not really happy with the
_NUMPY_SCTYPES
(reaching into what is now private, but figured that others will do so also for a while; feels like we should add a better way to do this in NumPy before removing it).Listing the full set is also a bit ugly/convoluted, but happy to do so instead.
(I was hoping to get a bit further with testing against the NumPy 2rc, but unfortunately the
numba
dependency makes that at least difficult.)xref: rapidsai/build-planning#38