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?
You can do that using .clip()
as follows:
img = img.clip(0)