Reshape an array in Python : <p>I have an NumPy array of size <code>100x32</code> that I would like to reshape it to <code>10x10x32</code>. Therefore, the first 10 rows to be the first element of the new matrix 1x10x32, the next 10 rows to be the second element and so on. I tried to use reshape, however, I am not sure if it is quite a smooth solution, for example I did the following:</p>

<pre><code>pred = pred.reshape(10, 10, 32) # pred initial is of size 100x32
</code></pre>

<p>Does that code do what I want properly?</p>
