Is there a numpy function that splits an array into equal chunks of size m (excluding any remainder which would have a size less than m). I have looked at the function np.array_split but that doesn't let you split by specifying the sizes of the chunks.
An example of what I'm looking for is below:
X = np.arange(10)
split (X, size = 3)
-> [ [0,1,2],[3,4,5],[6,7,8], [9] ]
split (X, size = 4)
-> [ [0,1,2,3],[4,5,6,7],[8,9]]
split (X, size = 5)
-> [ [0,1,2,3,4],[5,6,7,8,9]]