Пример #1
0
def test_even_size():
    y = colfilter(np.zeros_like(mandrill), (-1,1))
    assert y.shape == (mandrill.shape[0]+1, mandrill.shape[1])
    assert not np.any(y[:] != 0.0)

    z = colfilter_gold(np.zeros_like(mandrill), (-1,1))
    assert_almost_equal(y, z)
Пример #2
0
def test_even_size():
    y = colfilter(np.zeros_like(mandrill), (-1, 1))
    assert y.shape == (mandrill.shape[0] + 1, mandrill.shape[1])
    assert not np.any(y[:] != 0.0)

    z = colfilter_gold(np.zeros_like(mandrill), (-1, 1))
    assert_almost_equal(y, z)
Пример #3
0
def test_biort():
    y = colfilter(mandrill, biort('antonini')[0])
    assert y.shape == mandrill.shape

    z = colfilter_gold(mandrill, biort('antonini')[0])
    assert_almost_equal(y, z)
Пример #4
0
def test_qshift():
    y = colfilter(mandrill, qshift('qshift_a')[0])
    assert y.shape == (mandrill.shape[0]+1, mandrill.shape[1])

    z = colfilter_gold(mandrill, qshift('qshift_a')[0])
    assert_almost_equal(y, z)
Пример #5
0
def test_odd_size():
    y = colfilter(mandrill, (-1,2,-1))
    assert y.shape == mandrill.shape

    z = colfilter_gold(mandrill, (-1,2,-1))
    assert_almost_equal(y, z)
Пример #6
0
def test_even_size():
    y = colfilter(mandrill, (-1,1))
    assert y.shape == (mandrill.shape[0]+1, mandrill.shape[1])

    z = colfilter_gold(mandrill, (-1,1))
    assert_almost_equal(y, z)
Пример #7
0
def test_biort():
    y = colfilter(lena, biort('antonini')[0])
    assert y.shape == lena.shape

    z = colfilter_gold(lena, biort('antonini')[0])
    assert_almost_equal(y, z)
Пример #8
0
def test_odd_size():
    y = colfilter(mandrill, (-1, 2, -1))
    assert y.shape == mandrill.shape

    z = colfilter_gold(mandrill, (-1, 2, -1))
    assert_almost_equal(y, z)
Пример #9
0
def test_odd_size():
    y = colfilter(lena, (-1,2,-1))
    assert y.shape == lena.shape

    z = colfilter_gold(lena, (-1,2,-1))
    assert_almost_equal(y, z)
Пример #10
0
def test_even_size():
    y = colfilter(lena, (-1,1))
    assert y.shape == (lena.shape[0]+1, lena.shape[1])

    z = colfilter_gold(lena, (-1,1))
    assert_almost_equal(y, z)
Пример #11
0
def test_even_size_non_array():
    y = colfilter(mandrill.tolist(), (-1, 1))
    assert y.shape == (mandrill.shape[0] + 1, mandrill.shape[1])

    z = colfilter_gold(mandrill.tolist(), (-1, 1))
    assert_almost_equal(y, z)
Пример #12
0
def test_odd_size_non_array():
    y = colfilter(mandrill.tolist(), (-1, 2, -1))
    assert y.shape == mandrill.shape

    z = colfilter_gold(mandrill.tolist(), (-1, 2, -1))
    assert_almost_equal(y, z)
Пример #13
0
def test_biort():
    y = colfilter(mandrill, biort('antonini')[0])
    assert y.shape == mandrill.shape

    z = colfilter_gold(mandrill, biort('antonini')[0])
    assert_almost_equal(y, z)
Пример #14
0
def test_qshift():
    y = colfilter(mandrill, qshift('qshift_a')[0])
    assert y.shape == (mandrill.shape[0] + 1, mandrill.shape[1])

    z = colfilter_gold(mandrill, qshift('qshift_a')[0])
    assert_almost_equal(y, z)
Пример #15
0
def test_odd_size_non_array():
    y = colfilter(mandrill.tolist(), (-1,2,-1))
    assert y.shape == mandrill.shape

    z = colfilter_gold(mandrill.tolist(), (-1,2,-1))
    assert_almost_equal(y, z)
Пример #16
0
def test_qshift():
    y = colfilter(lena, qshift('qshift_a')[0])
    assert y.shape == (lena.shape[0]+1, lena.shape[1])

    z = colfilter_gold(lena, qshift('qshift_a')[0])
    assert_almost_equal(y, z)
Пример #17
0
def test_even_size_non_array():
    y = colfilter(mandrill.tolist(), (-1,1))
    assert y.shape == (mandrill.shape[0]+1, mandrill.shape[1])

    z = colfilter_gold(mandrill.tolist(), (-1,1))
    assert_almost_equal(y, z)
Пример #18
0
def test_even_size():
    y = colfilter(mandrill, (-1, 1))
    assert y.shape == (mandrill.shape[0] + 1, mandrill.shape[1])

    z = colfilter_gold(mandrill, (-1, 1))
    assert_almost_equal(y, z)