Repository navigation
Closes #4235: searchsorted to work with uint type - #4440
Merged
ajpotts merged 1 commit intoMay 23, 2025
Merged
Conversation
1RyanK
marked this pull request as ready for review
May 22, 2025 12:47
1RyanK
force-pushed
the
4235-searchsorted_to_work_with_uint_type
branch
from
May 22, 2025 13:10
31b2f96 to
10ed544
Compare
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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 think
searchsortedshould work with uint types now. The problem was that somehow,v = ak.array(v, dtype) + shiftwould turnvinto an array offloat64ifvwas originallyuint64andshiftwas 0. I changed it to bev = ak.array(ak.array(v, dtype) + shift, dtype)(and similarly where we do the same thing toa) and now tests pass. This should probably be fixed inbinopvsor wherever it is as well, I imagine this is probably not intended behavior.I also added a check that the data types match in
searchsorted.Closes #4235: searchsorted to work with uint type