I have stored 4 ndarrays in a dictionary dictPrices
and would like to generate another boolean ndarray for each of the 2 cases:
(1) element-wise, if number in any of the 4 ndarrays exceed x
(2) element-wise, if number in all of the 4 ndarrays exceed x
dictPrices[1] >= x
works but when i tried (dictPrices[1] >= x | dictPrices[2] >= x)
, it fails. (dictPrices[1] >= x or dictPrices[2] >= x)
failed too.
As the ndarrays can be huge (from monte carlo), I was hoping for vectorization rather than to loop through each ndarray element-wise.
Thank you!