scipp.where¶
- scipp.where(condition, x, y)¶
Return elements chosen from x or y depending on condition.
- Parameters
condition (scipp._scipp.core.Variable) – Variable with dtype=bool. Where True, yield x, otherwise yield y.
x (scipp._scipp.core.Variable) – Variable with values from which to choose.
y (scipp._scipp.core.Variable) – Variable with values from which to choose.
- Returns
Variable with elements from x where condition is True, and elements from y elsewhere.
- Seealso
- Return type