示例#1
0
 def test_ZeroOne(self):
     for N in np.arange(2,20):
         m = 0
         w = pyyawt.symwavf("sym" + str(N))
         np.testing.assert_almost_equal(np.sum(w[2*m:(2*N+2*m)]*w[0:2*N]),1, decimal=self.accuracy_decimal)
         for m in np.arange(1, N-1):
             np.testing.assert_almost_equal(np.sum(w[2*m:(2*N)]*w[0:2*N-2*m]),0, decimal=self.accuracy_decimal)
示例#2
0
 def test_sumOdd(self):
     for N in np.arange(2,20):
         w = pyyawt.symwavf("sym" + str(N))
         np.testing.assert_almost_equal(np.sum(w[1::2]),1./np.sqrt(2), decimal=self.accuracy_decimal)