'Test trimming of 2D array when size is not perfectly divisible
by block_size.'

def test_2d_trim(self):

    data1 = np.arange(15).reshape(5, 3)
    result1 = block_reduce(data1, 2)
    data2 = data1[0:4, 0:2]
    result2 = block_reduce(data2, 2)
    assert np.all((result1 == result2))
