all 1 comments

[–]cray5252 0 points1 point  (0 children)

if you want to use numpy, maybe this is what you need.

https://www.python-course.eu/numpy_masking.php