I have 200000 colored images each of dimensions (50x50x3) stored as a list of list in Python. Because its all in a list, I want to change it to numpy array of dimension (200000,50,50,3). However, using np.toarray(list) returns an array of shape (200000,)
But if I shorten the list (say take only 10000 elements) and then do np.toarray(shortened_list), it returns a correct array of shape (10000,50,50,3)
I want to do this to feed the images to a CNN using Keras.