In order to get the index corresponding to the "99" value in a numpy array, we do :
mynumpy=([5,6,9,2,99,3,88,4,7))
np.where(my_numpy==99)
What if, I want to get the index corresponding to the following values 99,55,6,3,7? Obviously, it's possible to do it with a simple loop but I'm looking for a more vectorization solution. I know Numpy is very powerful so I think it might exist something like that.
desired output :
searched_values=np.array([99,55,6,3,7])
np.where(searched_values in mynumpy)
[(4),(),(1),(5),(8)]