I want to have something that could split an 1-D array :
np.array([600, 400, 300, 600, 100, 0, 2160])
into a 2-D array based on a value, e.g. 500 such that the resulting array should look like
500 | 100 | 0 | 0 | 0
400 | 0 | 0 | 0 | 0
300 | 0 | 0 | 0 | 0
500 | 100 | 0 | 0 | 0
100 | 0 | 0 | 0 | 0
0 | 0 | 0 | 0 | 0
500 | 500 | 500 | 500 | 160
where we fill from the left with how many 500's there could be and the last one as a reminder.
I am thinking of using np.divmod() but have no idea how to structure the array itself.