mirror of
https://github.com/davrot/pytutorial.git
synced 2025-07-15 18:00:03 +02:00
549 B
549 B
Where
{:.no_toc}
* TOC {:toc}The goal
Questions to David Rotermund
numpy.where
numpy.where(condition, [x, y, ]/)
Return elements chosen from x or y depending on condition.
condition : array_like, bool Where True, yield x, otherwise yield y.
x, y : array_like Values from which to choose. x, y and condition need to be broadcastable to some shape.