Say we have an array
a = np.array([10,30,50, 20, 10, 90, 0, 25])
Pseudocode for what I want -
if a[x] > 80 then perform funcA on a[x] if 40 < a[x] <= 80 then perform funcB on a[x] if a[x] <= 40 then perform funcC on a[x]
What is the cleanest way to accomplish this with numpy functions?
python numpy
tnt
source share