[Scipy-svn] r5488 - trunk/scipy/fftpack/tests

scipy-svn@scip... scipy-svn@scip...
Sun Jan 18 05:26:17 CST 2009


Author: cdavid
Date: 2009-01-18 05:26:09 -0600 (Sun, 18 Jan 2009)
New Revision: 5488

Modified:
   trunk/scipy/fftpack/tests/test_real_transforms.py
Log:
Add test for norm mode of DCT III.

Modified: trunk/scipy/fftpack/tests/test_real_transforms.py
===================================================================
--- trunk/scipy/fftpack/tests/test_real_transforms.py	2009-01-18 11:25:49 UTC (rev 5487)
+++ trunk/scipy/fftpack/tests/test_real_transforms.py	2009-01-18 11:26:09 UTC (rev 5488)
@@ -165,6 +165,16 @@
                     "Output dtype is %s, expected %s" % (y.dtype, self.rdt))
             assert_array_almost_equal(dct2(y) / (2*x.size), x)
 
+    def test_definition_ortho(self):
+        """Test orthornomal mode."""
+        for i in range(len(X)):
+            x = np.array(X[i], dtype=self.rdt)
+            y = dct2(x, norm='ortho')
+            xi = dct3(y, norm="ortho")
+            self.failUnless(xi.dtype == self.rdt,
+                    "Output dtype is %s, expected %s" % (xi.dtype, self.rdt))
+            assert_array_almost_equal(xi, x)
+
     def test_axis(self):
         nt = 2
         for i in [7, 8, 9, 16, 32, 64]:



More information about the Scipy-svn mailing list