title: Numpy split array into chunks of equal size with remainder
body: <p>Is there a numpy function that splits an array into <em><strong>equal chunks of size m</strong></em> (excluding any remainder which would have a size less than m). I have looked at the function <a href="https://numpy.org/doc/stable/reference/generated/numpy.array_split.html" rel="noreferrer">np.array_split</a> but that doesn't let you split by specifying the sizes of the chunks.</p>
  <p>An example of what I'm looking for is below:</p>
  <pre><code>X = np.arange(10)
  split (X, size = 3)
  -&gt; [ [0,1,2],[3,4,5],[6,7,8], [9] ]
  
  split (X, size = 4)
  -&gt; [ [0,1,2,3],[4,5,6,7],[8,9]]
  
  split (X, size = 5)
  -&gt; [ [0,1,2,3,4],[5,6,7,8,9]]
  </code></pre>