[Numpy-svn] r8169 - trunk/numpy/fft

numpy-svn@scip... numpy-svn@scip...
Sat Feb 20 12:14:31 CST 2010


Author: ptvirtan
Date: 2010-02-20 12:14:30 -0600 (Sat, 20 Feb 2010)
New Revision: 8169

Modified:
   trunk/numpy/fft/helper.py
Log:
3K: fft: fix integer division in (i)fftshift

Modified: trunk/numpy/fft/helper.py
===================================================================
--- trunk/numpy/fft/helper.py	2010-02-20 18:14:11 UTC (rev 8168)
+++ trunk/numpy/fft/helper.py	2010-02-20 18:14:30 UTC (rev 8169)
@@ -60,7 +60,7 @@
     y = tmp
     for k in axes:
         n = tmp.shape[k]
-        p2 = (n+1)/2
+        p2 = (n+1)//2
         mylist = concatenate((arange(p2,n),arange(p2)))
         y = take(y,mylist,k)
     return y
@@ -106,7 +106,7 @@
     y = tmp
     for k in axes:
         n = tmp.shape[k]
-        p2 = n-(n+1)/2
+        p2 = n-(n+1)//2
         mylist = concatenate((arange(p2,n),arange(p2)))
         y = take(y,mylist,k)
     return y



More information about the Numpy-svn mailing list