numpy.intersect1d_nu

numpy.intersect1d_nu(ar1, ar2)

Intersection returning unique elements common to both arrays.

Parameters:

ar1,ar2 : array_like

Input arrays.

Returns:

out : ndarray, shape(N,)

Sorted 1D array of common and unique elements.

See also

intersect1d
Returns repeated or unique common elements.
numpy.lib.arraysetops
Module with a number of other functions for performing set operations on arrays.

Examples

>>> np.intersect1d_nu([1,3,3],[3,1,1])
array([1, 3])

Previous topic

numpy.intersect1d

Next topic

numpy.setdiff1d

This Page

Quick search