

def test_pad_repeat_border(self):
    x = np.array([[1.0, 2.0], [3.0, 4.0]])
    y = np.array([[1.0, 1.0, 1.0, 2.0, 2.0, 2.0], [1.0, 1.0, 1.0, 2.0, 2.0, 2.0], [1.0, 1.0, 1.0, 2.0, 2.0, 2.0], [3.0, 3.0, 3.0, 4.0, 4.0, 4.0], [3.0, 3.0, 3.0, 4.0, 4.0, 4.0], [3.0, 3.0, 3.0, 4.0, 4.0, 4.0]])
    y1 = dd.util.pad_repeat_border(x, 2)
    np.testing.assert_array_equal(y, y1)
    y = np.array([[1.0, 2.0], [1.0, 2.0], [1.0, 2.0], [3.0, 4.0], [3.0, 4.0], [3.0, 4.0]])
    y1 = dd.util.pad_repeat_border(x, (2, 0))
    np.testing.assert_array_equal(y, y1)

dataset/ETHPy150Open uchicago-cs/deepdish/deepdish/tests/test_util.py TestUtil.test_pad_repeat_border/original