[Scipy-tickets] [SciPy] #1704: interpolate does not warn about repeated x values

SciPy Trac scipy-tickets@scipy....
Fri Jul 20 14:11:05 CDT 2012


#1704: interpolate does not warn about repeated x values
-------------------------------+--------------------------------------------
 Reporter:  thejowe55          |       Owner:  somebody   
     Type:  defect             |      Status:  new        
 Priority:  normal             |   Milestone:  Unscheduled
Component:  scipy.interpolate  |     Version:  0.10.0     
 Keywords:                     |  
-------------------------------+--------------------------------------------

Comment(by rgommers):

 Or we keep pointing people to the newer, shinier interface:
 {{{
 In [36]: a = interpolate.UnivariateSpline(x, y)

 In [37]: a(np.linspace(0, 5))
 Out[37]:
 array([-1.        , -0.68459145, -0.38427016, -0.09850487,  0.17323564,
         0.43148263,  0.67676733,  0.90962099,  1.13057485,  1.34016014,
         1.53890811,  1.72735   ,  1.90601705,  2.07544051,  2.2361516 ,
         2.38868159,  2.5335617 ,  2.67132317,  2.80249726,  2.92761519,
         3.04720822,  3.16180758,  3.27194451,  3.37815026,  3.48095606,
         3.58089317,  3.6784928 ,  3.77428622,  3.86880466,  3.96257937,
         4.05614157,  4.15002252,  4.24475346,  4.34086563,  4.43889026,
         4.5393586 ,  4.64280189,  4.74975138,  4.8607383 ,  4.97629389,
         5.0969494 ,  5.22323607,  5.35568513,  5.49482784,  5.64119542,
         5.79531913,  5.9577302 ,  6.12895987,  6.30953939,  6.5       ])

 In [38]: a.get_coeffs()
 Out[38]: array([ 1.5       ,  3.41666667,  3.83333333,  5.        ])

 In [39]: a.get_knots()
 Out[39]: array([ 1.,  4.])
 }}}

 Wontfix? Or add a few warnings in the docs?

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


More information about the Scipy-tickets mailing list