[Scipy-svn] r6910 - trunk/scipy/fftpack

scipy-svn@scip... scipy-svn@scip...
Fri Nov 19 22:49:44 CST 2010


Author: warren.weckesser
Date: 2010-11-19 22:49:44 -0600 (Fri, 19 Nov 2010)
New Revision: 6910

Modified:
   trunk/scipy/fftpack/basic.py
   trunk/scipy/fftpack/realtransforms.py
Log:
ENH: fftpack: update 'raise' statements (and remove unused imports)

Modified: trunk/scipy/fftpack/basic.py
===================================================================
--- trunk/scipy/fftpack/basic.py	2010-11-20 04:44:53 UTC (rev 6909)
+++ trunk/scipy/fftpack/basic.py	2010-11-20 04:49:44 UTC (rev 6910)
@@ -6,7 +6,7 @@
 __all__ = ['fft','ifft','fftn','ifftn','rfft','irfft',
            'fft2','ifft2']
 
-from numpy import zeros, swapaxes, integer, array
+from numpy import zeros, swapaxes
 import numpy
 import _fftpack
 
@@ -316,7 +316,7 @@
     tmp = _asfarray(x)
 
     if not numpy.isrealobj(tmp):
-        raise TypeError,"1st argument must be real sequence"
+        raise TypeError("1st argument must be real sequence")
 
     try:
         work_function = _DTYPE_TO_RFFT[tmp.dtype]
@@ -349,7 +349,7 @@
     """
     tmp = _asfarray(x)
     if not numpy.isrealobj(tmp):
-        raise TypeError,"1st argument must be real sequence"
+        raise TypeError("1st argument must be real sequence")
 
     try:
         work_function = _DTYPE_TO_RFFT[tmp.dtype]

Modified: trunk/scipy/fftpack/realtransforms.py
===================================================================
--- trunk/scipy/fftpack/realtransforms.py	2010-11-20 04:44:53 UTC (rev 6909)
+++ trunk/scipy/fftpack/realtransforms.py	2010-11-20 04:49:44 UTC (rev 6910)
@@ -180,7 +180,7 @@
     """
     tmp = np.asarray(x)
     if not np.isrealobj(tmp):
-        raise TypeError,"1st argument must be real sequence"
+        raise TypeError("1st argument must be real sequence")
 
     if n is None:
         n = tmp.shape[axis]



More information about the Scipy-svn mailing list