block mean of numpy 2d array,"a = a.reshape((a.shape[0], -1, n))"