I was wondering if there was a syntactically simple way of checking if each element in a numpy array lies between two numbers.
In other words, just as numpy.ar
numpy.ar
Another would be to use numpy.any, Here is an example
numpy.any
import numpy as np a = np.array([1,2,3,4,5]) np.any((a < 1)|(a > 5 ))