Masoud FCBimport numpy as np
x = np.array([5, 8, 2, 9])
y = np.array([4, 7, 5, 9])
#---- Intersection ----
z1 = np.array( list( set(x) & set(y) ) )
#---- Union -----
z2 = np.array( list( set(x) | set(y) ) )
#---- difference ----
z3 = np.array( list( set(x) ^ set(y) ) )