Skip to content
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

add find_first function (Trac #1738) #2333

Closed
numpy-gitbot opened this issue Oct 19, 2012 · 1 comment
Closed

add find_first function (Trac #1738) #2333

numpy-gitbot opened this issue Oct 19, 2012 · 1 comment

Comments

@numpy-gitbot
Copy link

Original ticket http://projects.scipy.org/numpy/ticket/1738 on 2011-02-09 by @nbecker, assigned to unknown.

find_first would be a performance enhancement. The current alternative would be something like:

argmax (some boolean function...)

which requires a lot of extra work if all you want is the index of the first occurance.

This is frequently wanted for 1-d arrays, where it's meaning is unambiguous. I think semantics for n-d (n > 1) arrays is up for discussion.

@numpy-gitbot
Copy link
Author

@rgommers wrote on 2011-03-24

Duplicate of #2269 (more or less, I added a comment there).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant