[SciPy-User] cubic spline interpolation with scipy.interpolate.interp1d

Jaidev Deshpande deshpande.jaidev@gmail....
Sat Mar 19 15:21:00 CDT 2011


What do you mean by the interpolation being global? We only calculate cubic
coefficients for splines between the required nodes, right?
Also, is there a way to check if 'interp1d' does more than just store the
cubic coefficients? Does it produce some other unnecessary data?

On Sun, Mar 20, 2011 at 1:46 AM, Pauli Virtanen <pav@iki.fi> wrote:

> On Sun, 20 Mar 2011 00:27:19 +0530, Jaidev Deshpande wrote:
> > The scipy.interpolate.interp1d class generates an interpolation object
> > which I find to be somewhat sluggish and also a little unnecessary.
> >
> > Are there alternatives that will simply produce an array?
> Computing a spline interpolant requires solving for the spline
> coefficients. This step takes some time, and storing the coefficients
> somewhere cannot be avoided, because spline interpolation is global.
> Whether the spline coefficients are stored for later use or thrown away
> immediately will not likely affect the performance much. You can try
> using the low-level functions `splrep` and `splev`, but this will
> probably not be much faster.
> --
> Pauli Virtanen
> _______________________________________________
> SciPy-User mailing list
> SciPy-User@scipy.org
> http://mail.scipy.org/mailman/listinfo/scipy-user
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.scipy.org/pipermail/scipy-user/attachments/20110320/ae81aac9/attachment.html 

More information about the SciPy-User mailing list