shape = (A.shape[0] / block[0], A.shape[1] / block[1]) + block
strides = (block[0] * A.strides[0], block[1] * A.strides[1]) + A.strides
Summing each 3x3 window of a M*N matrix, into a M/3*N/3 matrix with numpy