[Scipy-tickets] [SciPy] #1480: scipy.signal.decimate wrong slice object

SciPy Trac scipy-tickets@scipy....
Mon Jul 18 09:45:44 CDT 2011


#1480: scipy.signal.decimate wrong slice object
--------------------------+-------------------------------------------------
 Reporter:  llwang        |       Owner:  somebody   
     Type:  defect        |      Status:  new        
 Priority:  normal        |   Milestone:  Unscheduled
Component:  scipy.signal  |     Version:  devel      
 Keywords:                |  
--------------------------+-------------------------------------------------
 In function decimate in signaltools.py, the slice object sl should be
 initialized as

 sl = [slice(None)]*y.ndim

 rather than

 sl = [None]*y.ndim

 Using None instead of slice(None) results in extraneous dimensions being
 created, and the down-sampled dimension is always the first dimension.

 foo = zeros((10, 10))

 scipy.signal.decimate(foo, 2, axis=1).shape

 (1, 5, 10)

 The desired result should have the shape (10, 5).

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


More information about the Scipy-tickets mailing list