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

Pauli Virtanen pav@iki...
Fri Mar 9 05:10:02 CST 2012


09.03.2012 10:26, Andreas H. kirjoitti:
> 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?

The reason for this is mostly history --- IIRC, the f2py wrappers were
written later than the C ones, so there's some duplication here. I don't
think there is a difference in performance.

For wrapping new functions, using f2py way will probably be the easier
way, and I'd recommend that over writing C wrappers.


More information about the SciPy-Dev mailing list