[Scipy-tickets] [SciPy] #289: scipy.interpolate.interp1d transposes its output when axis=0

SciPy scipy-tickets at scipy.net
Tue Oct 17 13:48:09 CDT 2006


#289: scipy.interpolate.interp1d transposes its output when axis=0
-------------------------------+--------------------------------------------
 Reporter:  Fruny              |       Owner:  somebody
     Type:  defect             |      Status:  new     
 Priority:  normal             |   Milestone:          
Component:  scipy.interpolate  |     Version:  devel   
 Severity:  normal             |    Keywords:          
-------------------------------+--------------------------------------------
 When the interpolation is done on the first axis, the other axes get
 transposed in the output.

 {{{
 from numpy import *
 from scipy.interpolate import interp1d

 Y = arange(5*7*11*13).reshape(5,7,11,13)
 X = arange(5)
 print interp1d(X,Y,axis=0)(X).shape     # Get (5,13,11,7), expected
 (5,7,11,13)

 X = arange(7)
 print interp1d(X,Y,axis=1)(X).shape     # Get (5,7,11,13) as expected

 X = arange(11)
 print interp1d(X,Y,axis=2)(X).shape     # Get (5,7,11,13) as expected

 X = arange(13)
 print interp1d(X,Y,axis=3)(X).shape     # Get (5,7,11,13) as expected

 }}}

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


More information about the Scipy-tickets mailing list