I have been going through several solutions, but I am not able to find a solution I need.
I have two numpy arrays. Let\'s take a small example<
numpy
If you really do have numpy arrays then you can use numpy.setdiff1d as below
import numpy as np x = np.array([1,2,3,4,5,6,7,8,9]) y = np.array([3,4,5]) z = np.setdiff1d(x, y) # array([1, 2, 6, 7, 8, 9])