-
Notifications
You must be signed in to change notification settings - Fork 903
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
Simple NumPy 2 fixes that are clearly no behavior change #15876
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
seberg
force-pushed
the
numpy2-simple-fixes
branch
2 times, most recently
from
May 29, 2024 12:55
4c3cb2b
to
90ab9fe
Compare
Had to replace the last commit. There are too many uint64s around to work with Python ints on NumPy 1, so need to use uint64 explicitly in more places to make it work with NumPy 2 and 1 logic. |
Using uint8 fails because mixing it with Python integers try to stick with uint8 on NumPy 2. Using Python integers fails some NumPy 1.x paths, because mixing them with uint64 scalars fails on NumPy 1. uint64 should work on both versions. Also moved a warnings ignore from the tests to the function
seberg
force-pushed
the
numpy2-simple-fixes
branch
from
May 29, 2024 13:00
90ab9fe
to
ce37898
Compare
lithomas1
added
improvement
Improvement / enhancement to an existing function
non-breaking
Non-breaking change
labels
May 29, 2024
wence-
requested changes
May 30, 2024
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.
No real quibbles, just a few questions and one (possible) cleanup
wence-
approved these changes
May 30, 2024
galipremsagar
approved these changes
May 30, 2024
/merge |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
improvement
Improvement / enhancement to an existing function
non-breaking
Non-breaking change
Python
Affects Python cuDF API.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
I have a branch that works, but some changes may need a bit of thought to get right, so splitting out the simpler half.
(N.B. the only bigger chunk that is remaining is to make sure that
uint_series > -1
keeps working at least as well as before)In either case, these are changes that:
copy=False
innp.array()
uint8(-1)
now (only changed this where it is test-only)float(float32)
to avoid overflow.int8(-1)
gives effectively the old promotion (to float) rather than erroring to not implicit go to float based on the value.The main noise, is that I parametrized that one test since it seemed easy enough.
xref: rapidsai/build-planning#38