[SciPy-dev] new function regrid for fitpack2

John Travers jtravs at gmail.com
Tue Oct 10 14:48:04 EDT 2006


Hi all,

I've just submitted a ticket (#286) with patches to add support for
the regrid function from dierckx (fitpack) to the scipy interface.

regrid is used for fitting smoothing or interpolating splines to
rectangular mesh data. It is more efficient and stable than using
surfit (which is designed for scattered data).

The patch makes use of the newstyle fitpack2 interface based on hand
coded fitpack.pyf. The added class is RectBivariateSpline?. A simple
test case is included.

Can somebody tell me why the dierckx function surfit is currently used
in interp2d?

As far as I can tell from the documentation (and the fitpack author's
book) surfit shouldn't be used for interpolation. It is designed for
smoothing scattered data. I say this as the reason I implemented the
regrid function is because interp2d wouldn't work for my data. regrid
does (and *is* designed for interpolation or smoothing of rectangular
data). Can I suggest that interp2d uses regrid instead (or do people
need to interpolate scattered data, in which case a different library
alltogether would be required)?

I'm willing to work out the required patches to make these changes if
people think I should.

Best regards,
John Travers



More information about the SciPy-Dev mailing list