summaryrefslogtreecommitdiff
path: root/numpy/fft
diff options
context:
space:
mode:
authorCharles Harris <charlesr.harris@gmail.com>2013-03-28 07:10:01 -0700
committerCharles Harris <charlesr.harris@gmail.com>2013-03-28 07:10:01 -0700
commit40742184df68fc01f3392c9865f35d5402e74b01 (patch)
tree4d4832417a28e128ed989fc273d322a551d1cfdb /numpy/fft
parentdb75eb44a31fe1bb04a0f673fd459614bfd02b85 (diff)
parentb995d00e2e54bc6ff97f21bd179d1fc4dc3c92cb (diff)
downloadnumpy-40742184df68fc01f3392c9865f35d5402e74b01.tar.gz
Merge pull request #3122 from charris/2to3-apply-xrange-fixer
2to3: Replace xrange by range and use list(range(...)) where needed
Diffstat (limited to 'numpy/fft')
-rw-r--r--numpy/fft/fftpack.py4
-rw-r--r--numpy/fft/helper.py4
2 files changed, 4 insertions, 4 deletions
diff --git a/numpy/fft/fftpack.py b/numpy/fft/fftpack.py
index 54d071884..d229f0702 100644
--- a/numpy/fft/fftpack.py
+++ b/numpy/fft/fftpack.py
@@ -511,7 +511,7 @@ def _cook_nd_args(a, s=None, axes=None, invreal=0):
shapeless = 0
s = list(s)
if axes is None:
- axes = range(-len(s), 0)
+ axes = list(range(-len(s), 0))
if len(s) != len(axes):
raise ValueError("Shape and axes have different lengths.")
if invreal and shapeless:
@@ -522,7 +522,7 @@ def _cook_nd_args(a, s=None, axes=None, invreal=0):
def _raw_fftnd(a, s=None, axes=None, function=fft):
a = asarray(a)
s, axes = _cook_nd_args(a, s, axes)
- itl = range(len(axes))
+ itl = list(range(len(axes)))
itl.reverse()
for ii in itl:
a = function(a, n=s[ii], axis=axes[ii])
diff --git a/numpy/fft/helper.py b/numpy/fft/helper.py
index 763d6684b..c22c92d76 100644
--- a/numpy/fft/helper.py
+++ b/numpy/fft/helper.py
@@ -60,7 +60,7 @@ def fftshift(x, axes=None):
tmp = asarray(x)
ndim = len(tmp.shape)
if axes is None:
- axes = range(ndim)
+ axes = list(range(ndim))
elif isinstance(axes, (int, nt.integer)):
axes = (axes,)
y = tmp
@@ -108,7 +108,7 @@ def ifftshift(x, axes=None):
tmp = asarray(x)
ndim = len(tmp.shape)
if axes is None:
- axes = range(ndim)
+ axes = list(range(ndim))
elif isinstance(axes, (int, nt.integer)):
axes = (axes,)
y = tmp