Beispiel #1
0
 def test_idctn_vs_2d_reference(self):
     for function_set in self.function_sets:
         finverse = function_set['inverse']
         finverse_ref = function_set['inverse_ref']
         for dct_type in self.types:
             for norm in self.norms:
                 print(function_set, dct_type, norm)
                 fdata = dctn(self.data, type=dct_type, norm=norm)
                 y1 = finverse(fdata, type=dct_type, norm=norm)
                 y2 = finverse_ref(fdata, type=dct_type, norm=norm)
                 assert_array_almost_equal(y1, y2, decimal=11)
Beispiel #2
0
 def test_idctn_vs_2d_reference(self):
     for function_set in self.function_sets:
         finverse = function_set['inverse']
         finverse_ref = function_set['inverse_ref']
         for dct_type in self.types:
             for norm in self.norms:
                 print(function_set, dct_type, norm)
                 fdata = dctn(self.data, type=dct_type, norm=norm)
                 y1 = finverse(fdata, type=dct_type, norm=norm)
                 y2 = finverse_ref(fdata, type=dct_type, norm=norm)
                 assert_array_almost_equal(y1, y2, decimal=11)
 def test_idctn_vs_2d_reference(self):
     for function_set in self.function_sets:
         finverse = function_set['inverse']
         finverse_ref = function_set['inverse_ref']
         for dct_type in self.types:
             for norm in self.norms:
                 print(function_set, dct_type, norm)
                 if norm == 'ortho' and dct_type == 1:
                     continue  # 'ortho' not supported by DCT-I
                 fdata = dctn(self.data, type=dct_type, norm=norm)
                 y1 = finverse(fdata, type=dct_type, norm=norm)
                 y2 = finverse_ref(fdata, type=dct_type, norm=norm)
                 assert_array_almost_equal(y1, y2, decimal=11)
 def test_idctn_vs_2d_reference(self):
     for function_set in self.function_sets:
         finverse = function_set['inverse']
         finverse_ref = function_set['inverse_ref']
         for dct_type in self.types:
             for norm in self.norms:
                 print(function_set, dct_type, norm)
                 if norm == 'ortho' and dct_type == 1:
                     continue  # 'ortho' not supported by DCT-I
                 fdata = dctn(self.data, type=dct_type, norm=norm)
                 y1 = finverse(fdata, type=dct_type, norm=norm)
                 y2 = finverse_ref(fdata, type=dct_type, norm=norm)
                 assert_array_almost_equal(y1, y2, decimal=11)
 def test_idctn_vs_2d_reference(self, finverse, finverse_ref, dct_type,
                                norm):
     fdata = dctn(self.data, type=dct_type, norm=norm)
     y1 = finverse(fdata, type=dct_type, norm=norm)
     y2 = finverse_ref(fdata, type=dct_type, norm=norm)
     assert_array_almost_equal(y1, y2, decimal=11)
 def test_idctn_vs_2d_reference(self, finverse, finverse_ref,
                                dct_type, norm):
     fdata = dctn(self.data, type=dct_type, norm=norm)
     y1 = finverse(fdata, type=dct_type, norm=norm)
     y2 = finverse_ref(fdata, type=dct_type, norm=norm)
     assert_array_almost_equal(y1, y2, decimal=11)