For example, I have an array X = np.array([1,-3,5,0,9,12])
I wanna make a function a like this.
def bigfunction(X)
if X<0:
return 99
if X=>0 and X<=10
return 100
if X>10
return 101
Which return also an array. In this case [100,99,100,100,100,101]
Obviously, this code will not work.
It is very import that I can't do it in a loop. I am wondering that if there has implemented the code in numpy solve this problem.