I have a matrix of shape 4 x 129. I am trying to do a horizontal split like the example shown below:
In [18]: x = np.arange(4*129)
In [19]: x = x.reshape(4, 129)
In [20]: x.shape
Out[20]: (4, 129)
In [21]: y = np.hsplit(x, 13)
ValueError: array split does not result in an equal division
I understand that it can't split it equally into 13. I don't want to do zero pad one more column and divide by 13.
I want to split the x matrix into 13 small matrices, where the each 12 split should be in size of 4 x 10 and the last one should be in size of 4 x 9.
Is there any way to do like this ?