I want to detect a negative number and replace it with 0
a = np.arange(10) b=np.where(a<5,a,-1*a) b[b<0]=0 #conditional operator \'<\' b