I have 1000 RGB images which I want to read from the current directory and store it in a numpy array in the shape of (1000,3,32,32) for using it in CNN.
For this reason, I have read a sample image, resized it to 32 * 32. Then appended it to an array 'a' which I have created using zeros for the shape (1000,3,32,32). But I am getting an error called " 'numpy.ndarray' an object has no attribute 'append' ". How can it be solved? If it needs any different approach I am open to that as well.
import matplotlib.pyplot as plt import numpy as np reshapedimage =cv2.resize(cv2.imread("0 (1).png", 1), (32, 32)) a = np.zeros((1000,3,32,32)) a.append(reshapedimage)