I have an m*n matrix in numpy. I want to divide my matrix into 2*2 blocks and then replace each element with average of the elements in its block. for example consider the following array:. I want to divide
I have an m*n matrix in numpy. I want to divide my matrix into 2*2 blocks and then replace each element with average of the elements in its block. for example consider the following array:. I want to divide