scipp.logical_or#

scipp.logical_or(a, b)#

Element-wise logical or.

Equivalent to:

a | b
Parameters:
Returns:

TypeVar(VariableLikeType, Variable, DataArray, Dataset, DataGroup[Any]) – The logical or of the elements of a and b.

Examples

Logical 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_or(a, b)
<scipp.Variable> (x: 4)       bool        <no unit>  [True, True, True, False]