NumPy · Function
np.where
Select elements from x or y according to a Boolean condition. The inputs can be broadcast to a shared shape.
Last updated
Syntax
numpy.where(condition, [x, y, ] /)In-depth API docs are only for subscribers: parameters, examples, common mistakes and interview practice.
SubscribeRelated
choosenonzero