thanks a lot for your answer
else:
img=imageio.imread(args.inputPath)
image0=img0.open(r"C:\Users\ETTAQI\Documents\STAGE\imagecode\img2.png")
image0_array=np.array(image0)
imageio.imwrite(args.inputPath.split("/")[-1], image0_array)
I used this, I opened the image and defined it as an array, does that convert the image to an array?
because I have an error in another file:
File “C:\Users\ETTAQI\Documents\STAGE\PathoNet-master1\utils.py”, line 15, in generator
batch=np.random.choice(self.dataList,size=self.batchSize,replace=False)
File “mtrand.pyx”, line 908, in numpy.random.mtrand.RandomState.choice
ValueError: ‘a’ cannot be empty unless no samples are taken
the code is 
class DataLoader:
def init(self,batchSize,inputShape,dataList,guaMaxValue):
self.inputShape=inputShape
self.batchSize=batchSize
self.dataList=dataList
self.guaMaxValue=guaMaxValue
def generator(self):
while(1):
batch=np.random.choice(self.dataList,size=self.batchSize,replace=False)
images=[]
labels=[]
for b in batch:
img=imread(b)
images.append(img)
temp=np.load(b.replace(".jpg",".npy")).astype(int)
np.place(temp,temp==255,self.guaMaxValue)
labels.append(temp)
images=np.array(images)
yield (np.array(images)/255.).astype(np.float32),np.array(labels)