Find the set difference of two arrays.
Return the sorted, unique values in ar1 that are not in ar2.
Parameters : | ar1 : array_like
ar2 : array_like
assume_unique : bool
|
---|---|
Returns : | difference : ndarray
|
See also
Examples
>>> a = np.array([1, 2, 3, 2, 4, 1])
>>> b = np.array([3, 4, 5, 6])
>>> np.setdiff1d(a, b)
array([1, 2])