For example, there is a 4*2 matrix:
[[1, 2], [3, 4], [5, 6],[7,8]]
I want to reshape it to 2*2 matrix and the value of it is the mean value of the original matrix, so the result will be:
[[2,3],[6,7]]
Is there any effective way to do it? Thanks