[SciPy-user] fitpack spline fitting of periodic data

Jakob Nielsen jtoudahl.nielsen at gmail.com
Mon Mar 9 09:04:05 EDT 2009


Dear scipy users I am trying to use the per<>0 option in the fitpack routine
splrep of /scipy/interpolate/fitpack.py

The below test script gives an error: "ValueError:     Error on input data":

ar=linspace(0,2*pi,30)
vals=sin(ar)
ar[-1]=2*pi
knots=arange(30,360,30)*pi/180.0
tck=splrep(ar,vals,t=knots,per=1)

There is no errors using per=0, there is also errors using no t=None and
per=1.

Am I missing something? I though the first and last point of the x-values
should encode the periodicity.

hope you can help me,

best regards, JTN
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.scipy.org/pipermail/scipy-user/attachments/20090309/25fb9160/attachment.html>


More information about the SciPy-User mailing list