I have two arrays A (len of 3.8million) and B (len of 20k). For the minimal example, lets take this case:
A
B
A = np.array([1,1,2,3,3,
I am not very familiar with numpy, but how about using sets:
C = set(A.flat) - set(B.flat)
EDIT : from comments, sets cannot have duplicates values.
So another solution would be to use a lambda expression :
C = np.array(list(filter(lambda x: x not in B, A)))