[f2py] netlib spline source compilation
pearu at cens.ioc.ee
pearu at cens.ioc.ee
Tue Feb 22 10:02:46 EET 2005
On Mon, 21 Feb 2005, Jean-Michel Philippe wrote:
> Hello,
>
> I'm new to f2py and I try to compile extra spline routines that Scipy do
> not provide (mainly the netlib package 'dierckx' at
> http://www.netlib.org/dierckx/index.html). I managed to compile a Python
> library (it's not so difficult indeed!) so that I'm now able to load it
> into Python.
Scipy has double precision dierckx under interpolate/fitpack.
At the moment it has only handwritten wrappers but that should
changed to f2py generated ones in future.
> Strangely some routines work fine (eg. curfit) as other ones do not (eg.
> percur and cocosp). I get two behaviours for those who do not work:
>
> * the Fortran code gets called but seems to do nothing (ie. output
> matrices are full of zeros) - no error code, no hang
>
> * the Fortran code refuses to get called telling that it is not able
> to convert my Python arrays (eg. it says it expected a input zero-length
> matrix!)
Could you give some specific examples of the not working cases?
> Note that I formerly tried to compile the pppack library still from
> netlib (http://www.netlib.org/pppack/index.html) but it didn't work at
> all. After code cleaning to get it compiled with g77, I got the second
> kind of errors.
>
> As I don't know anything about Fortran, I'm really disappointed: is this
> due to Fortran code? To g77 compiler? To f2py wrapper? Did someone ever
> tried to compile these netlib packages?
Not sure. Sometimes wrapping certain Fortran codes requires reading
their documentation to understand what is the correct way to call
these Fortran codes and then take this into account when wrapping
with f2py.
HTH,
Pearu
More information about the f2py-users
mailing list