title: Resize a batch of images in numpy
body: <p>I have close to 10000 greyscale images in a numpy array (10000 x 480 x 752) and would like to resize them with the imresize function from scipy.misc. It works with a for loop build around all the images, but it takes 15 minutes.</p>
  
  <pre><code>images_resized = np.zeros([0, newHeight, newWidth], dtype=np.uint8)
  for image in range(images.shape[0]):
      temp = imresize(images[image], [newHeight, newWidth], 'bilinear')
      images_resized = np.append(images_resized, np.expand_dims(temp, axis=0), axis=0)
  </code></pre>
  
  <p>Is there any way to do this faster with an apply like function? I looked into apply_along_axis</p>
  
  <pre><code>def resize_image(image):
      return imresize(image, [newHeight, newWidth], 'bilinear')
  np.apply_along_axis(lambda x: resize_image(x), 0, images)
  </code></pre>
  
  <p>but this gives an</p>
  
  <pre><code>'arr' does not have a suitable array shape for any mode
  </code></pre>
  
  <p>error.</p>