scipp.logical_xor#
- scipp.logical_xor(a, b)#
Element-wise logical exclusive-or.
Equivalent to:
a ^ b
- Parameters:
- Returns:
TypeVar(VariableLikeType,Variable,DataArray,Dataset,DataGroup[Any]) – The logical exclusive-or of the elements ofaandb.
Examples
Logical exclusive-or of two boolean arrays:
>>> import scipp as sc >>> a = sc.array(dims=['x'], values=[True, True, False, False]) >>> b = sc.array(dims=['x'], values=[True, False, True, False]) >>> sc.logical_xor(a, b) <scipp.Variable> (x: 4) bool <no unit> [False, True, True, False]