numpy.mean on varying row size
<p>The numpy mean function works perfectly fine when the dimensions are the same.</p>

<pre><code>a = np.array([[1, 2], [3, 4]])
a.mean(axis=1)
array([ 1.5,  3.5])
</code></pre>

<p>But if I do it with varrying row size it gives an error</p>

<pre><code>a = np.array([[1, 2], [3, 4, 5]])
a.mean(axis=1)
IndexError: tuple index out of range
</code></pre>

<p>I cannot find anything on the documentation regarding this problem. I could calculate the mean myself but I would like to use the build in function for this, seeing that it should be possible. </p>