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 and replace them with 0. maybe someone can write some code?

Klasik
  • 872
  • 1
  • 9
  • 29

1 Answers1

1

You can do that using .clip() as follows:

img = img.clip(0)
sshashank124
  • 31,495
  • 9
  • 67
  • 76