[SciPy-dev] Combining Numpy/C/fortran ?
Fri Mar 9 05:44:43 CST 2007
Maybe this is what you're looking for?
Pierre GM wrote:
> I'm trying to write an interface to numpy for a piece of mixed C/fortran code,
> and I'm getting nowhere fast.
> Roughly, the code is organized as such: a first C file defines some base
> structures (involving long and double arrays) and initializes their members
> by calling Fortran routines, either directly or through a set of C functions
> defined in a second file. I need to get access to the initialized structures.
> I first started to get rid of the C structures by redefining them in Python,
> so that I would only have to call functions with array arguments (and not
> structures) and use f2py for the interface. However, this is not exactly a
> bug-safe approach. The best would be to get an interface Python/C structure,
> so that I could send ndarrays as inputs and get ndarrays as outputs.
> What is the easiest way to write such an interface ?
> Thanks a lot for any idea...
> Scipy-dev mailing list
More information about the Scipy-dev