Re: [f2py] f90 types as modul variables
James Kermode <[email protected]>
| Newsgroups | gmane.comp.python.f2py.user |
|---|---|
| Message-ID | <[email protected]> |
Dear Malte As far as I'm aware, there's no support for derived types in f2py yet. I believe this is planned for the 3rd generation version (F2PY G3, see http://www.f2py.org/Main/G3F2PY). However, I've had good success wrapping a Fortran 95 library which makes extensive use of derived types using the techniques described in the following paper to enable pointers to derived types objects to be passed between Fortran and Python as opaque handles. Pletzer, A et al., Exposing Fortran Derived Types to C and Other Languages, Computing in Science and Engineering, 10, 86 (2008). http://link.aip.org/link/?CSENFA/10/86/1 If you're interested you can read a bit more about the approach I've taken at http://www.jrkermode.co.uk/quippy/fortran_wrapper.html Best wishes James On 28 January 2010 13:24, <[email protected]> wrote: > Hello, > In my program, I would like to use own TYPEs which are defined as global variables in my module. > When I try to wrap this with f2py i get the following message: > getctype: No C-type found in "{'typespec': 'type', 'typename': 'testtype'}", assuming void. > > I have seen there are already some messages about this problem, but they are quite 'old'. > Have there been updates recently, regarding this problem? > > Thanks in advance > Malte Mauelshagen > > ---------------------------------------------------------------------------- > Deutsches Zentrum für Luft- und Raumfahrt e.V. > in der Helmholtz-Gemeinschaft > Ausbildung - Duale Hochschule Baden-Württemberg > > German Aerospace Center (DLR) > Member of the Helmholtz-Association > Institute of Aerodynamics and Flow Technology > > Malte Mauelshagen > > Lilienthalplatz 7 > 38108 Braunschweig > Tel.: 0531/295-2483 > > > _______________________________________________ > f2py-users mailing list > f2py-users-Y4l6ocDipWCuvFJfX82//[email protected] > http://cens.ioc.ee/mailman/listinfo/f2py-users > -- Dr James Kermode, Research Associate Department of Physics, King's College London Room: Strand 7.33, Tel: +44 (0)20 7848 2064 http://www.jrkermode.co.uk