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

scipy-svn@scip... scipy-svn@scip...
Tue Feb 9 19:50:10 CST 2010


Author: cdavid
Date: 2010-02-09 19:50:09 -0600 (Tue, 09 Feb 2010)
New Revision: 6222

Modified:
   trunk/scipy/fftpack/tests/test_basic.py
Log:
BUG: comparing real/imag parts does not work for assert_array_almost_equal_nulp.

I fixed assert_array_almost_equal_nulp to handle complex type in numpy
1.4.0.1 and in trunk

Modified: trunk/scipy/fftpack/tests/test_basic.py
===================================================================
--- trunk/scipy/fftpack/tests/test_basic.py	2010-02-09 08:41:34 UTC (rev 6221)
+++ trunk/scipy/fftpack/tests/test_basic.py	2010-02-10 01:50:09 UTC (rev 6222)
@@ -329,8 +329,7 @@
             raise ValueError("double precision output with single precision")
 
         y_r = np.array(fftn(x), np.complex64)
-        assert_array_almost_equal_nulp(np.real(y), np.real(y_r))
-        assert_array_almost_equal_nulp(np.imag(y), np.imag(y_r))
+        assert_array_almost_equal_nulp(y, y_r)
 
 class TestFftn(TestCase):
 



More information about the Scipy-svn mailing list