示例#1
0
    def test_ifwt1D_basic(self):
        """test that ifwt1D works basically"""

        X = Numeric.ones(8, Numeric.Float)
        Y = fwt(X)
        X1 = ifwt(Y)
        assert Numeric.allclose(X - X1, 0)
示例#2
0
    def test_ifwt1D_inverse_b(self):
        """test that fwt1D works as an inverse to ifwt"""

        for j in range(1, 9):
            N = 2 ** j
            for P in range(number_of_filters):
                D = 2 * (P + 1)

                X = Numeric.ones(N, Numeric.Float)
                Y = ifwt(X, D)

                X1 = fwt(Y, D)
                assert Numeric.allclose(X - X1, 0)
示例#3
0
    def test_callifwt(self):
        """test that ifwt can be called"""

        X = Numeric.array([[1, 2, 1], [3, 4, 3], [5, 6, 5], [7, 8, 7], [9.0, 10, 9]])
        Y = ifwt(X)