'Test 2D array with func=np.mean.'

def test_2d_mean(self):

    data = np.arange(4).reshape(2, 2)
    block_size = 2.0
    expected = (block_reduce(data, block_size, func=np.sum) / (block_size ** 2))
    result = block_reduce(data, block_size, func=np.mean)
    assert np.all((result == expected))
