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

scipy-svn@scip... scipy-svn@scip...
Sun Nov 2 02:53:00 CST 2008


Author: cdavid
Date: 2008-11-02 02:52:52 -0600 (Sun, 02 Nov 2008)
New Revision: 4907

Modified:
   trunk/scipy/fftpack/tests/test_basic.py
Log:
Add failing test for #244: fftn does not work when both shape and axes args are used.

Modified: trunk/scipy/fftpack/tests/test_basic.py
===================================================================
--- trunk/scipy/fftpack/tests/test_basic.py	2008-11-01 22:32:06 UTC (rev 4906)
+++ trunk/scipy/fftpack/tests/test_basic.py	2008-11-02 08:52:52 UTC (rev 4907)
@@ -359,6 +359,15 @@
         assert_array_almost_equal (y,swapaxes(\
             fftn(swapaxes(large_x1,-1,-2)),-1,-2))
 
+    def test_shape_axes_argument2(self):
+        x = numpy.random.random((10, 5, 3, 7))
+        y = fftn(x, axes=(-1,), shape=(8,))
+        assert_array_almost_equal(y, fft(x, axis=-1, n=8))
+
+        x = numpy.random.random((10, 5, 3, 7))
+        y = fftn(x, axes=(-2,), shape=(4,))
+        assert_array_almost_equal(y, fft(x, axis=-2, n=8))
+
     def test_shape_argument_more(self):
         # Test that fftn raise a value error exception when s.shape is longer
         # than x.shape
@@ -370,7 +379,6 @@
         except ValueError:
             pass
 
-
 class TestIfftn(TestCase):
 
     def test_definition(self):



More information about the Scipy-svn mailing list