Say there is this array:
x=np.arange(10).reshape(5,2)
x=array([[0, 1],
[2, 3],
[4, 5],
[6, 7],
[8, 9]])
Can the array be sliced such that for each row, except the first you combine the rows into a new matrix?
For example:
newMatrixArray[0]=array([[0, 1],
[2, 3]])
newMatrixArray[1]=array([[0, 1],
[4, 5]])
newMatrixArray[2]=array([[0, 1],
[6, 7]])
This would be easy to do with a for loop, but is there a pythonic way of doing it?