numpy.ma.setxor1d#

ma.setxor1d(ar1, ar2, assume_unique=False)[source]#

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

The output is always a masked array. See numpy.setxor1d for more details.

See also

numpy.setxor1d

Equivalent function for ndarrays.

Examples

>>> import numpy as np
>>> ar1 = np.ma.array([1, 2, 3, 2, 4])
>>> ar2 = np.ma.array([2, 3, 5, 7, 5])
>>> np.ma.setxor1d(ar1, ar2)
masked_array(data=[1, 4, 5, 7],
             mask=False,
       fill_value=999999)