Is there a NumPy function to return the first index of something in an array?
Asked 07 September, 2021
Viewed 1.3K times
  • 54
Votes

I know there is a method for a Python list to return the first index of something:

>>> l = [1, 2, 3]
>>> l.index(2)
1

Is there something like that for NumPy arrays?

17 Answer