I have a folder in which I have 100+ .npy files.
The path to this folder is '/content/drive/MyDrive/lung_cancer/subset0/trainImages'.
This folder has the .npy files as shown in the image the .npy files
The shape of each of these .npy files is (3,512,512)
I want to combine all of these files into one single file with the name trainImages.npy so that I can train my unet model with it.
My unet model takes input of the shape (1,512,512).
I will load the above trainImages.npy file into imgs_train as below to pass it as input into unet model
imgs_train = np.load(working_path+"trainImages.npy").astype(np.float32)
Can someone please tell me how do i concatenate all those .npy files into one single .npy file??
Thanks.
question from:
https://stackoverflow.com/questions/65951501/merge-multiple-npy-files-into-single-npy-file 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…