[SciPy-Dev] splev

Anne Archibald aarchiba at physics.mcgill.ca
Thu Jul 8 00:06:18 EDT 2010


On 7 July 2010 23:45, Charles R Harris <charlesr.harris at 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.

Anne

> Chuck
>
> _______________________________________________
> SciPy-Dev mailing list
> SciPy-Dev at scipy.org
> http://mail.scipy.org/mailman/listinfo/scipy-dev
>
>



More information about the SciPy-Dev mailing list