suppose I have the following Numpy 2d array (3*9)
[[-2 -2 -2 -2 -2 -2 -2 -2 -2]
[-2 -2 -2 -2 -2 -2 -2 -2 -2]
[-2 -2 71 -1 -1 -1 71 -1 52]]
I would like to equally divide this whole array by 3 and get the target array like this, which means I should get a 3d array of shape(3 by 3 by3):
[[-2 -2 -2] [-2 -2 -2] [-2 -2 -2]
[-2 -2 -2] [-2 -2 -2] [-2 -2 -2]
[-2 -2 71] [-1 -1 -1] [71 -1 52]]
Anyone can explain how to do this?