[f2py] Outputting unknown size arrays

Juergen Wieferink wieferink at freenet.de
Thu Dec 18 10:03:21 EET 2008


> My question is this:
> Is there any way for a wrapped subroutine to output arrays of unknown
> size when the size of the array is determined inside the subroutine?

AFAIR the only possibility to achieve this is via allocatable module
data.  That means that you need a Fortran 90 interface module
function to allocate this and, to be clean, an additional python
interface function to pass this allocated array back to the caller.
Please refer to the user guide on how to access module level
allocatable arrays.

Juergen





More information about the f2py-users mailing list