I want to save array values ββthat satisfy two or more conditions, for example:
a = np.array([1,3,5,6,4,6,7,8,9])
I want to save only values ββthat are greater than 3 and less than 7, my desired result is:
array([5, 6, 4, 6])
I see one way to do this:
a = a[(a > 3) * (a < 7)]
But something about this multiplication seems redundant, and I think I don't have a built-in method for something like that.
source share