[Scipy-svn] r5474 - trunk/scipy/fftpack/tests
scipy-svn at scipy.org
scipy-svn at scipy.org
Sat Jan 17 06:09:28 EST 2009
Author: cdavid
Date: 2009-01-17 05:09:18 -0600 (Sat, 17 Jan 2009)
New Revision: 5474
Modified:
trunk/scipy/fftpack/tests/test_real_transforms.py
Log:
Add test for orthonormal mode.
Modified: trunk/scipy/fftpack/tests/test_real_transforms.py
===================================================================
--- trunk/scipy/fftpack/tests/test_real_transforms.py 2009-01-17 11:08:51 UTC (rev 5473)
+++ trunk/scipy/fftpack/tests/test_real_transforms.py 2009-01-17 11:09:18 UTC (rev 5474)
@@ -122,6 +122,16 @@
"Output dtype is %s, expected %s" % (y.dtype, self.rdt))
assert_array_almost_equal(y, yr)
+ def test_definition_ortho(self):
+ """Test orthornomal mode."""
+ for i in range(len(X)):
+ x = np.array(X[i], dtype=self.rdt)
+ yr = direct_fft_dct2(x, matlab=True)
+ y = dct2(x, norm="ortho")
+ self.failUnless(y.dtype == self.rdt,
+ "Output dtype is %s, expected %s" % (y.dtype, self.rdt))
+ assert_array_almost_equal(y, yr)
+
def test_axis(self):
nt = 2
for i in [7, 8, 9, 16, 32, 64]:
More information about the Scipy-svn
mailing list