How to load multiple images in a numpy array ?
<p>How to load pixels of multiple images in a directory in a numpy array . I have loaded a single image in a numpy array . But can not figure out how to load multiple images from a directory . Here what i have done so far </p>

<pre><code>image = Image.open('bn4.bmp')
nparray=np.array(image)
</code></pre>

<p>This loads a 32*32 matrices . I want to load 100 of the images in a numpy array . I want to make 100*32*32 size numpy array . How can i do that ? I know that the structure would look something like this </p>

<pre><code>for filename in listdir("BengaliBMPConvert"):
  if filename.endswith(".bmp"):
       -----------------
  else:
       continue
</code></pre>

<p>But can not find out how to load the images in numpy array </p>