numpy.setxor1d

numpy.setxor1d(ar1, ar2)

Set exclusive-or of 1D arrays with unique elements.

Use unique1d() to generate arrays with only unique elements to use as inputs to this function.

Parameters:

ar1 : array_like

Input array.

ar2 : array_like

Input array.

Returns:

xor : ndarray

The values that are only in one, but not both, of the input arrays.

See also

numpy.lib.arraysetops
Module with a number of other functions for performing set operations on arrays.

Previous topic

numpy.setmember1d

Next topic

numpy.union1d

This Page

Quick search