[Scipy-tickets] [SciPy] #1630: fftpack.fft2 / fftpack.ifft2 overwrite_x option does nothing

SciPy Trac scipy-tickets@scipy....
Sun Mar 25 17:33:30 CDT 2012


#1630: fftpack.fft2 / fftpack.ifft2 overwrite_x option does nothing
--------------------------------+-------------------------------------------
 Reporter:  david.warde-farley  |       Owner:  cdavid     
     Type:  defect              |      Status:  new        
 Priority:  normal              |   Milestone:  Unscheduled
Component:  scipy.fftpack       |     Version:  0.9.0      
 Keywords:                      |  
--------------------------------+-------------------------------------------
 Observed in scipy 0.9.0, EPD 7.1-2 on OS X 64-bit.

 I see that fft2 and ifft2 has an "overwrite_x" parameter, which is
 what you actually want, but it is *quite* broken (normally these
 things only work with Fortran-contiguous inputs, but this isn't
 working at all):

 {{{
 >>> a = numpy.array(numpy.random.randn(2, 2), order='F')
 >>> a
 array([[ 0.18671055, -1.01763466],
       [-0.40909016, -0.43029087]])
 >>> a.flags
  C_CONTIGUOUS : False
  F_CONTIGUOUS : True
  OWNDATA : True
  WRITEABLE : True
  ALIGNED : True
  UPDATEIFCOPY : False
 >>> b = scipy.fftpack.fft2(a, overwrite_x=True)
 >>> b is a
 False
 >>> b.flags
  C_CONTIGUOUS : True
  F_CONTIGUOUS : False
  OWNDATA : True
  WRITEABLE : True
  ALIGNED : True
  UPDATEIFCOPY : False
 >>> a
 array([[ 0.18671055, -1.01763466],
       [-0.40909016, -0.43029087]])
 }}}

 Once fixed, overwrite_x should also be documented as (presumably) only
 working for Fortran-contiguous inputs.

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


More information about the Scipy-tickets mailing list