title: Reading multiple RGB images to numpy array
body: <p>I want to read multiple RGB images to a numpy array. All my images are of resolution (32,32,3). I have 10 images in the folder and I want my final "images" numpy array as (10, 32, 32, 3). I tried below code.</p>
  
  <pre><code>import matplotlib.image as mpimg
  import os
  
  folder = 'test_images'
  images = np.array([(mpimg.imread(os.path.join(folder, filename))) for filename in os.listdir('test_images')], dtype='uint8')
  </code></pre>
  
  <p>I get below error</p>
  
  <pre><code>    ValueError                                Traceback (most recent call last)
  &lt;ipython-input-109-0c5d51212e48&gt; in &lt;module&gt;()
        3 
        4 folder = 'test_images'
  ----&gt; 5 images = np.array([(mpimg.imread(os.path.join(folder, filename))) for filename in os.listdir('test_images')], dtype='uint8')
        6 
        7 print(len(images))
  
  ValueError: could not broadcast input array from shape (32,32,3) into shape (32,32)
  </code></pre>