This reverts commit 64df774691dfb2bd3abd5fcf4a01a37d4413038e.
Downsample the rows and columns of a matrix.