예제 #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)