What's the fastest way of returning the index of the FIRST match between a variable and an element within an ndarray? I see numpy.where used a lot, but that returns all indices.
match = 5000
zArray = np.array([[0,1200,200],[1320,24,5000],[5000,234,5230]])
>array([[ 0, 1200, 200],
[1320, 24, 5000],
[5000, 234, 5230]])
numpy.where(zArray==match)
>(array([1, 2], dtype=int64), array([2, 0], dtype=int64))
I'd like the first index returned, i.e. just [1,2]. but numpy.where returns both [1,2] and [2,0]