[SciPy-user] scipy.interpolate spline class names

josef.pktd@gmai... josef.pktd@gmai...
Wed May 20 21:38:10 CDT 2009

On Wed, May 20, 2009 at 9:54 PM, Erik Tollerud <erik.tollerud@gmail.com> wrote:
> I use the splines in scipy.interpolate quite a bit, and I particularly
> like  the *UnivariateSpline and *BivariateSpline  wrapper classes.
> However, I cannot for the life of me work out what gives with the
> names and documentation... As far as I can tell, the univariate
> splines are as follows:
> UnivariateSpline : A spline where the number of knots is chosen using
> the "smoothing factor" s
> LSQUnivariateSpline: A spline where the knots are explicitly specified

At least the docs need a lot of improvement, I tried out the splines
for the first time a short time ago, and I only realized this for
LSQUnivariateSpline after receiving exceptions when I wanted to update
the knots as described in the docs. Also, the dispatch behaviour of
UnivariateSpline is not described.
The docs for the original wrappers, splrep, splev, sproot, spalde,
splint, is more informative.

I was looking at these spline classes as a replacement for the spline
implementation in stats.models, but for a newbie to splines the
documentation is not very helpful.

But the splines produce nice pictures.


> InterpolatedUnivariateSpline: A spline with s=0 or t=[] (e.g. passes
> through all the fitting points)
> The documentation just says the second two "just have less error
> checking"... aren't they for very different purposes?  And while I
> recognize that name changes at this stage might be uncalled for, the
> names are somewhat misleading, too... shouldn't they be
> "SmoothUnivariateSpline","KnotUnivariateSpline", and
> "InterpolatedUnivariateSpline" or something like that?
> It also seems there are similar versions for the *BivariateSpline
> classes, although it's unclear to me exactly what the raw
> BivariateSpline class does as compared to the SmoothBivariateSpline
> (and the RectBivariateSpline, at least, makes sense)
> _______________________________________________
> SciPy-user mailing list
> SciPy-user@scipy.org
> http://mail.scipy.org/mailman/listinfo/scipy-user

More information about the SciPy-user mailing list