f2py Assumed-Size Array Arguments
Fausto Arinos de A. Barbuto
fbarbuto at telusplanet.net
Mon Aug 26 19:58:27 EDT 2002
Is that Fortran-90? Maybe f2py is not prepared to convert
a F-90 source into Python. Just guessing...
---Fausto
Darryl <darryl.genovesi at lmco.com> wrote:
> [...]
> For example, if I try to wrap a file containing:
>
> -------------------------------------------------------
> module mod0
>
> implicit none
>
> contains
>
> real function array_sum( a )
> real, intent(in), dimension(:) :: a
> array_sum = sum( a )
> return
> end function
>
> end module
> --------------------------------------------------------
>
> f2py will generate the error message:
>
> 15 Lines Compiled
> ifc -KPIC -FI -w90 -w95 -O3 -xM
> -I/usr/local/Python-2.2.1/lib/python2.2/site-packages/f2py2e/src -c
> /usr/tmp/@20794.0/array_sum-f2pywrappers.f -o
> /usr/tmp/@20794.0/array_sum-f2pywrappers.o
> external subroutine F2PYWRAP_MOD0_ARRAY_SUM
> array_sumf2pywrap = array_sum(a)
> ^
> Error 259 at (8:/usr/tmp/@20794.0/array_sum-f2pywrappers.f) : This
> function has the wrong number of arguments or arguments with the wrong
> name, type or rank
> external subroutine F2PYINITMOD0
>
> 1 Error
> compilation aborted for /usr/tmp/@20794.0/array_sum-f2pywrappers.f
> (code 1)
> error: failure during compile
More information about the Python-list
mailing list