summaryrefslogtreecommitdiff
path: root/numpy/fft/helper.py
diff options
context:
space:
mode:
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 4e1da2abd..99b576708 100644
--- a/numpy/fft/helper.py
+++ b/numpy/fft/helper.py
@@ -7,6 +7,7 @@ __all__ = ['fftshift','ifftshift','fftfreq']
from numpy.core import asarray, concatenate, arange, take, \
array, integer
+from numpy import hstack
import types
def fftshift(x,axes=None):
@@ -62,5 +63,4 @@ def fftfreq(n,d=1.0):
f = [0,1,...,(n-1)/2,-(n-1)/2,...,-1]/(d*n) if n is odd
"""
assert isinstance(n,types.IntType) or isinstance(n, integer)
- k = range(0,(n-1)/2+1)+range(-(n/2),0)
- return array(k,'d')/(n*d)
+ return hstack((arange(0,(n-1)/2 + 1), arange(-(n/2),0))) / (n*d)