[Scipy-tickets] [SciPy] #1534: The shape of the output of UnivariateSpline is incorrect

SciPy Trac scipy-tickets@scipy....
Mon Oct 10 05:24:52 CDT 2011


#1534: The shape of the output of UnivariateSpline is incorrect
-------------------------------+--------------------------------------------
 Reporter:  jpaalasm           |       Owner:  somebody   
     Type:  defect             |      Status:  new        
 Priority:  normal             |   Milestone:  Unscheduled
Component:  scipy.interpolate  |     Version:  0.9.0      
 Keywords:                     |  
-------------------------------+--------------------------------------------
 The shape of the output of {{{UnivariateSpline.__call__}}} does not match
 the shape of the input when the input is a one-item array.


 {{{
 In [1]: import scipy.interpolate

 In [2]: f = scipy.interpolate.UnivariateSpline([1,2,3,4], [1,2,3,4])

 In [3]: f(1)
 Out[3]: 0.99999999999999956

 In [4]: f([1])
 Out[4]: 0.99999999999999956

 In [5]: f([1, 2])
 Out[5]: array([ 1.,  2.])

 }}}

 The consistent bahavior would be {{{f([1]) -> [1.0]}}}

 rather than the current {{{f([1]) -> 1.0}}}

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


More information about the Scipy-tickets mailing list