NumPy save some arrays at once : <p>I working on different shapes of arrays and I want to save them all with <code>numpy.save</code>, so, consider I have  </p>

<pre><code>mat1 = numpy.arange(8).reshape(4, 2)
mat2 = numpy.arange(9).reshape(2, 3)
numpy.save('mat.npy', numpy.array([mat1, mat2]))
</code></pre>

<p>It works. But when I have two matrices with one dimension of same size it's not working.  </p>

<pre><code>mat1 = numpy.arange(8).reshape(2, 4)
mat2 = numpy.arange(10).reshape(2, 5)
numpy.save('mat.npy', numpy.array([mat1, mat2]))
</code></pre>

<p>It causes<br>
<code>Traceback (most recent call last):
  File "&lt;input&gt;", line 1, in &lt;module&gt;
ValueError: could not broadcast input array from shape (2,4) into shape (2)</code></p>

<p>And note that the problem caused by <code>numpy.array([mat1, mat2])</code> and not by <code>numpy.save</code></p>

<p>I know that such array is possible:</p>

<p><code>&gt;&gt; numpy.array([[[1, 2]], [[1, 2], [3, 4]]])
    array([[[1, 2]], [[1, 2], [3, 4]]], dtype=object)</code></p>

<p>So, all of what I want is to save two arrays as <code>mat1</code> and <code>mat2</code> at once.</p>
