04pallav
9/11/2017 - 10:30 PM

numpy where

numpy where

arr=np.array([0,1,2])
np.where(arr < 5,0,arr)
Out
array([0, 0, 0])