[Scipy-tickets] [SciPy] #289: scipy.interpolate.interp1d incorrectly 'rolls' its last axis.

SciPy scipy-tickets at scipy.net
Sat Nov 4 12:55:54 CST 2006


#289: scipy.interpolate.interp1d incorrectly 'rolls' its last axis.
-------------------------------+--------------------------------------------
 Reporter:  Fruny              |        Owner:  rkern   
     Type:  defect             |       Status:  assigned
 Priority:  normal             |    Milestone:          
Component:  scipy.interpolate  |      Version:  devel   
 Severity:  normal             |   Resolution:          
 Keywords:                     |  
-------------------------------+--------------------------------------------
Comment (by Fruny):

 Ok, I have a possible fix. In iterp1d.__call__, at or near line 260, there
 is:
 {{{
 #!python
         axes = range(ny-nx)
         axes[self.axis:self.axis] = range(ny - nx, ny)
 }}}
 Replace them with:
 {{{
 #!python
         axes = range(ny-nx)
         if self.axis < ny - nx:
             del axes[self.axis]
             axes.append(self.axis)
         axes[self.axis:self.axis] = range(ny - nx, ny)
 }}}

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


More information about the Scipy-tickets mailing list