title: How to combine dimensions in numpy array?
body: <p>I'm using <code>OpenCV</code> to read images into <code>numpy.array</code>, and they have the following shape.</p>
  
  <pre><code>import cv2
  
  def readImages(path):
      imgs = []
      for file in os.listdir(path):
          if file.endswith('.png'):
              img = cv2.imread(file)
              imgs.append(img)
      imgs = numpy.array(imgs)
      return (imgs)
  
  imgs = readImages(...)
  print imgs.shape  # (100, 718, 686, 3)
  </code></pre>
  
  <p>Each of the image has 718x686 pixels/dimension. There are 100 images.</p>
  
  <p>I don't want to work on 718x686, I'd like to combine the pixels into a single dimension. That is, the shape should look like: <code>(100,492548,3)</code>. Is there anyway either in OpenCV (or any other library) or Numpy that allows me to do that?</p>