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

scipy-svn at scipy.org scipy-svn at scipy.org
Wed Jan 7 10:53:41 EST 2009


Author: cdavid
Date: 2009-01-07 09:53:37 -0600 (Wed, 07 Jan 2009)
New Revision: 5363

Modified:
   trunk/scipy/fftpack/tests/test_basic.py
Log:
BUG: Fix single prec tests for rfft and irfft.

Modified: trunk/scipy/fftpack/tests/test_basic.py
===================================================================
--- trunk/scipy/fftpack/tests/test_basic.py	2009-01-07 15:53:21 UTC (rev 5362)
+++ trunk/scipy/fftpack/tests/test_basic.py	2009-01-07 15:53:37 UTC (rev 5363)
@@ -236,8 +236,8 @@
             y = rfft(x)
             y1 = direct_rdft(x)
             assert_array_almost_equal(y,y1)
-            self.failUnless(y1.dtype == self.rdt,
-                    "Output dtype is %s, expected %s" % (y1.dtype, self.rdt))
+            self.failUnless(y.dtype == self.rdt,
+                    "Output dtype is %s, expected %s" % (y.dtype, self.rdt))
 
     def test_djbfft(self):
         from numpy.fft import fft as numpy_fft
@@ -273,10 +273,10 @@
         x2_1 = [1,2+3j,4+1j,2+3j,4+5j,4-5j,2-3j,4-1j,2-3j]
 
         def _test(x, xr):
-            y = irfft(x)
+            y = irfft(np.array(x, dtype=self.rdt))
             y1 = direct_irdft(x)
-            self.failUnless(y1.dtype == self.rdt,
-                    "Output dtype is %s, expected %s" % (y1.dtype, self.rdt))
+            self.failUnless(y.dtype == self.rdt,
+                    "Output dtype is %s, expected %s" % (y.dtype, self.rdt))
             assert_array_almost_equal(y,y1, decimal=self.ndec)
             assert_array_almost_equal(y,ifft(xr), decimal=self.ndec)
 




More information about the Scipy-svn mailing list