title: reordering of numpy arrays
body: <p>I want to reorder dimensions of my numpy array. The following piece of code works but it's too slow.</p>
  
  <pre><code>for i in range(image_size):
      for j in range(image_size):
          for k in range(3):
              new_im[k, i, j] = im[i, j, k]
  </code></pre>
  
  <p>After this, I vectorize the new_im:</p>
  
  <pre><code>new_im_vec = new_im.reshape(image_size**2 * 3)
  </code></pre>
  
  <p>That said, I don't need new_im and I only need to get to new_im_vec. Is there a better way to do this? image_size is about 256.</p>