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 are lots of operations in NumPy that could perhaps be put together to accomplish this. This will return indices of elements equal to item:
numpy.nonzero(array - item)
You could then take the first elements of the lists to get a single element.