[SciPy-Dev] how to wrap sphere.f from FITPACK for scipy.interpolate

Andreas H. lists@hilboll...
Fri Mar 9 03:26:07 CST 2012


I need the functionality of FITPACK's ``sphere.f`` function, which is a
spherical-coordinate version of ``surfit.f``, on which
scipy.interpolate.bisplev is based.

So I want to implement it for inclusion in scipy.interpolate. However, I
have trouble understanding how the low-level functions from FITPACK are
integrated into scipy. While the high-level functions, like
RectBivariateSpline, seem directly use fortran via f2py, the low-level
functions like bisplrep / bisplev seem to go via C to Fortran. I'd like
to know if there's practical reasons for this? Performance?

Anyways, I suppose the way to go for me would be to wrap the Fortran
routine in C in the files scipy/interpolate/src/_fitpackmodule.c and
_fitpack.h, and then wrap this C interface in Python in

Any objections? Any caveats you can think of when I tackle this?


More information about the SciPy-Dev mailing list