[Scipy-tickets] [SciPy] #948: fft of purely complex array with type complex256 array returns all zeros

SciPy Trac scipy-tickets@scipy....
Sat Mar 27 15:10:42 CDT 2010


#948: fft of purely complex array with type complex256 array returns all zeros
---------------------------+------------------------------------------------
 Reporter:  novak          |       Owner:  somebody
     Type:  defect         |      Status:  new     
 Priority:  high           |   Milestone:  0.8.0   
Component:  scipy.fftpack  |     Version:  0.7.0   
 Keywords:  fft complex    |  
---------------------------+------------------------------------------------

Comment(by warren.weckesser):

 FFTPACK has single and double precision versions, so it can handle data
 sizes up to float64 or complex128.  Attempting to perform an FFT with
 float128 or complex256 should raise an exception.

 This is true for the functions fft, ifft, rfft, irfft, fftn, and ifftn.

 Currently the functions have explicit checks for complex128, complex64 and
 float32, and if the data type is not one of these, the default function is
 called (e.g. in fft(), fftpack.zrfft is called).  A check needs to be
 added to ensure that the data type is not too big.

 @fftpack gurus: Would something like this in, for example, the fft()
 function in  fftpack/basic.py be a sufficient check?
 {{{
     tmp = asarray(x)
     if istype(tmp, numpy.float128) or istype(tmp, numpy.complex256):
         raise ValueError("unsupported data type for fft: %s" % tmp.dtype)
 }}}

-- 
Ticket URL: <http://projects.scipy.org/scipy/ticket/948#comment:2>
SciPy <http://www.scipy.org>
SciPy is open-source software for mathematics, science, and engineering.


More information about the Scipy-tickets mailing list