[Numpy-discussion] numpy.fftpack: axis=None ?
PGM
pgmdevlist at gmail.com
Wed Sep 6 05:52:11 EDT 2006
Folks,
I was playing around the numpy.fftpack when I ran into the problem below:
it seems that axis=None is not valid with fft. Is there a reason for that ? I
was assuming a behavior similar to other functions, where axis=None
translates to "use a flat array".
------------------------------------------------------
>>> N.fft.fft(N.arange(100).reshape(10,10),128,None)
/usr/lib64/python2.4/site-packages/numpy/fft/fftpack.py in fft(a, n, axis)
85 different n's."""
86
---> 87 return _raw_fft(a, n, axis, fftpack.cffti, fftpack.cfftf,
_fft_cache)
88
89
/usr/lib64/python2.4/site-packages/numpy/fft/fftpack.py in _raw_fft(a, n,
axis, init_function, work_function, fft_cache)
44 fft_cache[n] = wsave
45
---> 46 if a.shape[axis] != n:
47 s = list(a.shape)
48 if s[axis] > n:
TypeError: tuple indices must be integers
-------------------------------------------------
More information about the NumPy-Discussion
mailing list