intersection of 2d and 1d numpy array,"A.ravel()[np.in1d(A, B)] = 0"