

def test_pad(self):
    x = np.ones((2, 2))
    y = np.array([[0, 0, 0, 0, 0, 0], [0, 0, 1, 1, 0, 0], [0, 0, 1, 1, 0, 0], [0, 0, 0, 0, 0, 0]])
    y1 = dd.util.pad(x, (1, 2), value=0.0)
    np.testing.assert_array_equal(y, y1)
    x = np.ones((2, 2))
    y = np.array([[2, 2, 2, 2], [2, 1, 1, 2], [2, 1, 1, 2], [2, 2, 2, 2]])
    y1 = dd.util.pad(x, 1, value=2.0)
    np.testing.assert_array_equal(y, y1)

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