-
-
Notifications
You must be signed in to change notification settings - Fork 25.8k
Fixes #30400: update index finding with np.where(condition) #31115
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
Conversation
06b1395
to
9509e24
Compare
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.
Given the consensus for this change expressed in the linked discussion and the fact that the rendered examples look unchanged and the tests pass, +1 on my side.
Changed np.where(condition) to condition.nonzero() in multiple examples.
84b14e2
to
597569d
Compare
Hey, dropping a comment here just in case this got buried. Is there anything else I should be doing? Thanks. |
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.
LGTM.
I really find that np.where
is more intuitive for this task, but it's not the main intended usage so I'm okay to use the recommended function for this task.
I triggered a doc build to be safe |
Towards #30400
Changed np.where(condition) to condition.nonzero() in multiple examples, so the code is in order with the numpy documentation.