summaryrefslogtreecommitdiff
path: root/numpy/fft/helper.py
diff options
context:
space:
mode:
authorPauli Virtanen <pav@iki.fi>2010-02-20 18:14:30 +0000
committerPauli Virtanen <pav@iki.fi>2010-02-20 18:14:30 +0000
commit550df270b2daf3eb231e2232269b987d4b6120f4 (patch)
tree46e238e984fb6e30e94eac1014ec97a8ca62675a /numpy/fft/helper.py
parentc3c6b10be50eefeb78aa71cdb7367d48021699e7 (diff)
downloadpython-numpy-550df270b2daf3eb231e2232269b987d4b6120f4.tar.gz
python-numpy-550df270b2daf3eb231e2232269b987d4b6120f4.tar.bz2
python-numpy-550df270b2daf3eb231e2232269b987d4b6120f4.zip
3K: fft: fix integer division in (i)fftshift
Diffstat (limited to 'numpy/fft/helper.py')
-rw-r--r--numpy/fft/helper.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/numpy/fft/helper.py b/numpy/fft/helper.py
index e08f4b905..8bd2564de 100644
--- a/numpy/fft/helper.py
+++ b/numpy/fft/helper.py
@@ -60,7 +60,7 @@ def fftshift(x,axes=None):
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 @@ def ifftshift(x,axes=None):
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