[SciPy-Dev] splev

Charles R Harris charlesr.harris@gmail....
Wed Jul 7 23:19:06 CDT 2010

On Wed, Jul 7, 2010 at 10:06 PM, Anne Archibald

> On 7 July 2010 23:45, Charles R Harris <charlesr.harris@gmail.com> wrote:
> > Hi All,
> >
> > I opened ticket #1223 because the values returned by splev are not zero
> for
> > arguments outside of the interval of definition. Because splev evaluates
> > b-splines, which all have compact support, I think zero is the correct
> value
> > for such arguments. However, I also find that some tests assume that
> splev
> > extrapolates the interpolating polynomials defined in the first and last
> > spans, which is what splev currently does.  Consequently I thought it
> worth
> > bringing the topic up on the list for discussion before making the commit
> > that changes the behavior.
> Please do not make this change. The extrapolation you get now is ugly,
> as polynomial extrapolation always is, but a discontinuity is
> considerably uglier. Remember that the arguments and range are both
> floating-point, so that roundoff error can easily move an argument
> outside the range; if extrapolation is used this is unimportant, but
> if the spline flatly drops to zero this will produce wildly wrong
> answers.
Well, for my purposes extrapolation really screws things up. Note that the
b-splines at the ends are in fact c_{-1}, i.e., discontinuous, and the next
b-spline in has a discontinuous 1'st derivative, so on and so forth. The
discontinuities are mathematically correct, b-splines aren't polynomials.
Maybe we can add a keyword?

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.scipy.org/pipermail/scipy-dev/attachments/20100707/3c162c6d/attachment.html 

More information about the SciPy-Dev mailing list