In a low-level function that is called many times, I need to do the equivalent of python\'s list.index, but with a numpy array. The function needs to return when it finds the f
The only time I've had this problem, it was sufficient to cast the numpy array as a list:
a = numpy.arange(3) print(list(a).index(2)) >>> 2