How does numpy.reshape() with order = 'F' work? : <p>I thought I understood the reshape function in Numpy until I was messing around with it and came across this example:</p>

<pre><code>a = np.arange(16).reshape((4,4))
</code></pre>

<p>which returns:</p>

<pre><code>array([[ 0,  1,  2,  3],
       [ 4,  5,  6,  7],
       [ 8,  9, 10, 11],
       [12, 13, 14, 15]])
</code></pre>

<p>This makes sense to me, but then when I do:</p>

<pre><code>a.reshape((2,8), order = 'F')
</code></pre>

<p>it returns:</p>

<pre><code>array([[0,  8,  1,  9,  2, 10, 3, 11],
       [4, 12,  5, 13,  6, 14, 7, 15]])
</code></pre>

<p>I would expect it to return:</p>

<pre><code>array([[0, 4,  8, 12, 1, 5,  9, 13],
       [2, 6, 10, 14, 3, 7, 11, 15]])
</code></pre>

<p>Can someone please explain what is happening here? </p>
