I am trying to return an array (element-wise) of True/False values on a numpy array comparsion to a float64 static variable. Input and desired output array is 1x10 (column x row)
array = np.random.randint(10, size=(10,1))
Attempt 1:
bool = np.any((array >= min)&(array <= max))
Attempt 2:
bool = np.logical_and((array >= min),(array <= max))
Attempt 3:
bool = np.any([(array >= min)&(array <= max)])
Attempt 4:
bool = np.array(np.any([(array >= min)&(array <= max)]))
All four of the above methods produce this output in the interpreter
print(bool) = True
When desired output looks something like:
print(bool) = [True
False
True
True
False
False
True
False
False
True]
Thank you in advance for any insight you can provide me!
array, notice that every individual value is wrapped in an array, is this intentional?(10)and not(10,1):), and then there's no need for.ravel()in my answer.