Find the union of two arrays.
Return the unique, sorted array of values that are in either of the two input arrays.
Parameters : | ar1, ar2 : array_like
|
---|---|
Returns : | union : ndarray
|
See also
Examples
>>> np.union1d([-1, 0, 1], [-2, 0, 2])
array([-2, -1, 0, 1, 2])