[Scipy-svn] r5366 - in trunk/scipy/fftpack: . tests
scipy-svn at scipy.org
scipy-svn at scipy.org
Wed Jan 7 13:24:32 EST 2009
Author: cdavid
Date: 2009-01-07 12:24:18 -0600 (Wed, 07 Jan 2009)
New Revision: 5366
Modified:
trunk/scipy/fftpack/basic.py
trunk/scipy/fftpack/tests/test_basic.py
Log:
Handle single prec real input in fft/ifft.
Modified: trunk/scipy/fftpack/basic.py
===================================================================
--- trunk/scipy/fftpack/basic.py 2009-01-07 18:23:56 UTC (rev 5365)
+++ trunk/scipy/fftpack/basic.py 2009-01-07 18:24:18 UTC (rev 5366)
@@ -117,7 +117,10 @@
work_function = fftpack.cfft
else:
overwrite_x = 1
- work_function = fftpack.zrfft
+ if istype(tmp, numpy.float32):
+ work_function = fftpack.crfft
+ else:
+ work_function = fftpack.zrfft
#return _raw_fft(tmp,n,axis,1,overwrite_x,work_function)
if n is None:
@@ -157,7 +160,10 @@
work_function = fftpack.cfft
else:
overwrite_x = 1
- work_function = fftpack.zrfft
+ if istype(tmp, numpy.float32):
+ work_function = fftpack.crfft
+ else:
+ work_function = fftpack.zrfft
#return _raw_fft(tmp,n,axis,-1,overwrite_x,work_function)
if n is None:
Modified: trunk/scipy/fftpack/tests/test_basic.py
===================================================================
--- trunk/scipy/fftpack/tests/test_basic.py 2009-01-07 18:23:56 UTC (rev 5365)
+++ trunk/scipy/fftpack/tests/test_basic.py 2009-01-07 18:24:18 UTC (rev 5366)
@@ -145,9 +145,9 @@
self.cdt = np.complex64
self.rdt = np.float32
- @dec.skipif(True, "Single precision real input not implemented yet")
- def test_n_argument_real(self):
- pass
+ #@dec.skipif(True, "Single precision real input not implemented yet")
+ #def test_n_argument_real(self):
+ # pass
class _TestIFFTBase(TestCase):
def test_definition(self):
@@ -219,13 +219,13 @@
self.cdt = np.complex64
self.rdt = np.float32
- @dec.skipif(True, "Single precision real input not implemented yet")
- def test_random_real(self):
- pass
+ #@dec.skipif(True, "Single precision real input not implemented yet")
+ #def test_random_real(self):
+ # pass
- @dec.skipif(True, "Single precision real input not implemented yet")
- def test_definition_real(self):
- pass
+ #@dec.skipif(True, "Single precision real input not implemented yet")
+ #def test_definition_real(self):
+ # pass
class _TestRFFTBase(TestCase):
More information about the Scipy-svn
mailing list