[SciPy-User] basic spline interpolation in a few lines of numpy

denis denis-bz-gg@t-online...
Mon Dec 21 11:48:47 CST 2009

  I've put a couple of tiny spline functions in http://advice.mechanicalkern.com;
their aim is to help students get started with splines, with the aid
of numpy.
(They may, though, interpolate between two stools: unclear for
beginners, trivial for experts.)
Comments welcome.

""" basic spline interpolation in a few lines of numpy.
Keywords: interpolate, resample, B-spline, Catmull-Rom, numpy, getting-
    t = arange( 1000+1 )
    points = f(t)  # points in 1d 2d 3d ...
    curve = dotspline1( points, times=10 )  # at 0 .1 .2 ... 999.9

    surface = dotspline2( array, times=10 )  # an array of e.g. pixels

  -- denis

More information about the SciPy-User mailing list