where(condition, x1, x2, f=None)¶
Returns elements chosen from x or y depending on condition.
condition (bool array) – Where True, yield x1, otherwise yield x2.
x1 (array) – values from which to choose when condition is True.
x2 (array) – values from which to choose when condition is False.
f (ml_framework, optional) – Machine learning framework. Inferred from inputs if None.
An array with elements from x1 where condition is True, and elements from x2 elsewhere.