scipp.where#

scipp.where(condition, x, y)#

Return elements chosen from x or y depending on condition.

Parameters:
  • condition (Variable) – Variable with dtype=bool.

  • x (Variable) – Variable with values from which to choose.

  • y (Variable) – Variable with values from which to choose.

Returns:

Variable – Variable with elements from x where condition is True and elements from y elsewhere.