def setxor1d(ar1, ar2, assume_unique=False):
if not assume_unique:<EOL><INDENT>ar1 = unique(ar1)<EOL>ar2 = unique(ar2)<EOL><DEDENT>aux = ma.concatenate((ar1, ar2))<EOL>if aux.size == <NUM_LIT:0>:<EOL><INDENT>return aux<EOL><DEDENT>aux.sort()<EOL>auxf = aux.filled()<EOL><INDENT>flag = ediff1d( aux, to_end = <NUM_LIT:1>, to_begin = <NUM_LIT:1> ) == <NUM_LIT:0><EOL><DEDENT>flag = ma.concatenate(([True], (auxf[<NUM_LIT:1>:] != auxf[:-<NUM_LIT:1>]), [True]))<EOL><INDENT>flag2 = ediff1d( flag ) == <NUM_LIT:0><EOL><DEDENT>flag2 = (flag[<NUM_LIT:1>:] == flag[:-<NUM_LIT:1>])<EOL>return aux[flag2]<EOL>
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.