summaryrefslogtreecommitdiff
path: root/numpy/fft/helper.py
diff options
context:
space:
mode:
authorCharles Harris <charlesr.harris@gmail.com>2013-08-18 11:51:25 -0600
committerCharles Harris <charlesr.harris@gmail.com>2013-08-18 11:51:25 -0600
commitfbd6510d58a47ea0d166c48a82793f05425406e4 (patch)
tree330ce703eb02d20f96099c3fe0fc36ae33d4905b /numpy/fft/helper.py
parent8ddb0ce0acafe75d78df528b4d2540dfbf4b364d (diff)
downloadpython-numpy-fbd6510d58a47ea0d166c48a82793f05425406e4.tar.gz
python-numpy-fbd6510d58a47ea0d166c48a82793f05425406e4.tar.bz2
python-numpy-fbd6510d58a47ea0d166c48a82793f05425406e4.zip
STY: Giant comma spacing fixup.
Run the 2to3 ws_comma fixer on *.py files. Some lines are now too long and will need to be broken at some point. OTOH, some lines were already too long and need to be broken at some point. Now seems as good a time as any to do this with open PRs at a minimum.
Diffstat (limited to 'numpy/fft/helper.py')
-rw-r--r--numpy/fft/helper.py12
1 files changed, 6 insertions, 6 deletions
diff --git a/numpy/fft/helper.py b/numpy/fft/helper.py
index 058f6864d..2e35f6db6 100644
--- a/numpy/fft/helper.py
+++ b/numpy/fft/helper.py
@@ -68,8 +68,8 @@ def fftshift(x, axes=None):
for k in axes:
n = tmp.shape[k]
p2 = (n+1)//2
- mylist = concatenate((arange(p2,n),arange(p2)))
- y = take(y,mylist,k)
+ mylist = concatenate((arange(p2, n), arange(p2)))
+ y = take(y, mylist, k)
return y
@@ -116,8 +116,8 @@ def ifftshift(x, axes=None):
for k in axes:
n = tmp.shape[k]
p2 = n-(n+1)//2
- mylist = concatenate((arange(p2,n),arange(p2)))
- y = take(y,mylist,k)
+ mylist = concatenate((arange(p2, n), arange(p2)))
+ y = take(y, mylist, k)
return y
@@ -157,7 +157,7 @@ def fftfreq(n, d=1.0):
array([ 0. , 1.25, 2.5 , 3.75, -5. , -3.75, -2.5 , -1.25])
"""
- if not (isinstance(n,int) or isinstance(n, integer)):
+ if not (isinstance(n, int) or isinstance(n, integer)):
raise ValueError("n should be an integer")
val = 1.0 / (n * d)
results = empty(n, int)
@@ -213,7 +213,7 @@ def rfftfreq(n, d=1.0):
array([ 0., 10., 20., 30., 40., 50.])
"""
- if not (isinstance(n,int) or isinstance(n, integer)):
+ if not (isinstance(n, int) or isinstance(n, integer)):
raise ValueError("n should be an integer")
val = 1.0/(n*d)
N = n//2 + 1