scipp.logical_and#
- scipp.logical_and(a, b)#
Element-wise logical and.
Equivalent to:
a & b
- Parameters:
- Returns:
TypeVar(VariableLikeType,Variable,DataArray,Dataset,DataGroup[Any]) – The logical and of the elements ofaandb.
Examples
Logical and 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_and(a, b) <scipp.Variable> (x: 4) bool <no unit> [True, False, False, False]