pytutorial/numpy/where
David Rotermund cc7956cd71
Create README.md
Signed-off-by: David Rotermund <54365609+davrot@users.noreply.github.com>
2023-12-14 15:01:05 +01:00
..
README.md Create README.md 2023-12-14 15:01:05 +01:00

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.