[SciPy-User] Cubic splines - MATLAB vs Scipy.interpolate

Jaidev Deshpande deshpande.jaidev@gmail....
Tue Sep 27 14:04:55 CDT 2011


Hi

*The big question*: Why does the MATLAB function spline operate faster than
the cubic spline alternatives in Scipy, especially splrep and splev ?

------

*The context*: I'm working on an algorithm that bottlenecks on spline
interpolation.

Some functions in Scipy return an interpolation *object function *depending
on the input data which needs to be evaluated independently over the whole
range.

So I used 'lower order' functions like splrep and splev. Even that was too
slow.

Then I tried to write my own code for cubic splines, generating and solving
a system of 4N simultaneous equations for interpolation between N+1 points.

No matter what I do, the code is quite slow. How come the MATLAB function
spline operate so fast? What am I missing? What can I do to speed it up?

------------

Thanks
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.scipy.org/pipermail/scipy-user/attachments/20110928/6a5bd38b/attachment.html 


More information about the SciPy-User mailing list