title: How to split a numpy array knowing the size of each subarray
body: <p>I want to split a numpy array, along the first axis, into subarrays of unequal size. I have checked numpy.split but it seems that I can only pass indices instead of size (number of rows for each subarray).</p>
  
  <p>for example:</p>
  
  <pre><code>arr = np.array([[1,2], [3,4], [5,6], [7,8], [9,10]])
  </code></pre>
  
  <p>should yield:</p>
  
  <pre><code>arr.split([2,1,2]) = [array([[1,2], [3,4]]), array([5,6]), array([[7,8], [9,10]])]
  </code></pre>