diff options
author | Charles Harris <charlesr.harris@gmail.com> | 2013-04-21 19:46:02 -0700 |
---|---|---|
committer | Charles Harris <charlesr.harris@gmail.com> | 2013-04-21 19:46:02 -0700 |
commit | 56e806abb78ac03a5f45090a3b9bf7a6c9964026 (patch) | |
tree | 5c0106a65471d2c4bb85cd6b3dddf752d933fcf5 /numpy/fft/helper.py | |
parent | 1975606394d577421c4b4e21abb8fdadbdc572c0 (diff) | |
parent | c879ad8a39f2b74edcdaa05a2f2f854fb235537d (diff) | |
download | numpy-56e806abb78ac03a5f45090a3b9bf7a6c9964026.tar.gz |
Merge pull request #3242 from charris/2to3-apply-types-fixer
2to3: Apply types fixer.
Diffstat (limited to 'numpy/fft/helper.py')
-rw-r--r-- | numpy/fft/helper.py | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/numpy/fft/helper.py b/numpy/fft/helper.py index 56d03619f..0a475153f 100644 --- a/numpy/fft/helper.py +++ b/numpy/fft/helper.py @@ -4,14 +4,15 @@ Discrete Fourier Transforms - helper.py """ from __future__ import division, absolute_import, print_function +import numpy.core.numerictypes as nt +from numpy.core import ( + asarray, concatenate, arange, take, integer, empty + ) + # Created by Pearu Peterson, September 2002 __all__ = ['fftshift', 'ifftshift', 'fftfreq', 'rfftfreq'] -from numpy.core import asarray, concatenate, arange, take, \ - integer, empty -import numpy.core.numerictypes as nt -import types def fftshift(x, axes=None): """ @@ -156,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,types.IntType) 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) @@ -212,7 +213,7 @@ def rfftfreq(n, d=1.0): array([ 0., 10., 20., 30., 40., 50.]) """ - if not (isinstance(n,types.IntType) 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 |