I have two arrays, say:
a, b = np.array([13., 14., 15., 32., 33.]), np.array([15., 16., 17., 33., 34., 47.])
I need to find the indices of all the elements in a that are not present in b. In the above example the result would be:
[0, 1, 3]
Because a[0], a[1] and a[3] are 13., 14. and 32., which are not present in b. Notice that I don't care to know the actual values of 13., 14. and 32. (I could have used set(a).difference(set(b)), in that case). I am genuinely interested in the indices only.
If possible the answer should be "vectorized", i.e. not using a for loop.