python Genfromtxt how convert negative integer in to 0 -
img = np.genfromtxt (path+file,dtype=int, invalid_raise=false, missing_values= (all negatives), <<<--------------- usemask=false, filling_values=0)
i need catch negative integers , replace them 0. maybe can write code?
you can using .clip()
follows:
img = img.clip(0)