[SciPy-user] Periodic spline interpolation bug / memory error?

Zachary Pincus zpincus at stanford.edu
Wed Mar 15 17:05:27 CST 2006

On Mar 15, 2006, at 2:40 PM, Travis Oliphant wrote:

> Zachary Pincus wrote:
>> Hi folks,
>> I'm trying to estimate smooth contours with scipy's parametric
>> splines, given a set of (x, y) points known to lie along the contour.
>> Now, because contours are closed, special care must be taken to
>> ensure that the interpolated value at the last point be the same as
>> the interpolated value at the first point.
> You've potentially uncovered a bug.
> For periodic interpolation, I typically use Fourier methods.  I  
> presume,
> your known points are not "equally-spaced" though?

Yes, the points are irregularly spaced. I'm actually using the  
interpolation in a procedure to relax the spacing so that all points  
*are* equally spaced.

Right now, I'm working around this bug by overlapping the data on  
each end, and not evaluating the spline only at some distance from  
the ends. This works OK, in case anyone else needs to work around this.

> Hopefully your example will let us find the problem.

Let me know if I can help. I also forgot the version information:

In [49]: numpy.version.version
Out[49]: ''

In [50]: scipy.version.version
Out[50]: ''

All on OS X version 10.4.5 with python 2.4.2.


> -Travis
> _______________________________________________
> SciPy-user mailing list
> SciPy-user at scipy.net
> http://www.scipy.net/mailman/listinfo/scipy-user

More information about the SciPy-user mailing list