human
Numpy: find index of elements in one array that occur in another array
assistant
Here is some code to get index of elements in array `A` that occur in another array `B`

np.where(np.in1d(A, B))[0]

#Warning: this code generation is experimental. Please inspect the code for any bugs before executing.