Example #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)
Example #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)
Example #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)
Example #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)
Example #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)
Example #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)
Example #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)
Example #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)
Example #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)
Example #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)
Example #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)
Example #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)
Example #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)
Example #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)
Example #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)
Example #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)
Example #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)
Example #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)