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

SciPy scipy-tickets at scipy.net
Tue Oct 17 14:46:00 CDT 2006


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

  * summary:  scipy.interpolate.interp1d transposes its output when axis=0
              => scipy.interpolate.interp1d incorrectly
              'rolls' its last axis.

Comment:

 After further tests, the above report isn't quite exact.

 {{{
 >>> from numpy import *
 >>> from scipy.interpolate import interp1d
 >>>
 >>> A = [3, 4, 5, 6, 7, 8]
 >>> Y = arange(prod(A)).reshape(*A)
 >>> for n,s in enumerate(A):
 ...     X = arange(s)
 ...     I = interp1d(X,Y,axis=n)
 ...     print I(X).shape
 ...
 (3, 8, 4, 5, 6, 7)
 (3, 4, 8, 5, 6, 7)
 (3, 4, 5, 8, 6, 7)
 (3, 4, 5, 6, 8, 7)
 (3, 4, 5, 6, 7, 8)
 (3, 4, 5, 6, 7, 8)
 }}}

 It seems that only the last axis is moving around incorrectly.

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


More information about the Scipy-tickets mailing list