-
-
Notifications
You must be signed in to change notification settings - Fork 5.5k
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
reverse searchsorted is inconsistent on 1.3 #35272
Comments
Actually the array version looks correct to me. |
10 is the first value greater than or equal to 9.5. Which has an index of 1. 9 has an index of 2, but its not greater or equal to 9.5. So 1 is the correct answer for |
Yes with the usual interpretation of "greater than", but with |
That's extremely confusing! The doc should be rewritten, it's probably the reason this is broken. It really makes it seem like search runs backwards until it finds a number greater than x. |
Sure the docs should be inproved, the meaning of |
The range behaviour seems like the correct version, but needless to say it's extremely confusing getting different answers for these.
It gets worse if you use all floats, now both the range and the array are wrong:
The text was updated successfully, but these errors were encountered: