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