I have 6 different images. I want to store them together in a single numpy array. Is that possible? If yes, how can I do that?
from PIL import Image
from matplotlib import image
import matplotlib.pyplot as plt
from os import listdir
from numpy import asarray
import numpy as np
for i in range(1,6):
image=Image.open(str(i)+'.jpg')
image=image.resize((100,100))
temp=asarray(image)
print(np.append(X_train,temp,axis=0))
This raises the following Exception:
ValueError: all the input arrays must have same number of dimensions