[f2py] Allocatable Arrays In Output...
andrea.gavana at gmail.com
Fri Apr 7 11:48:05 EEST 2006
I am fighting against the possibility to have allocatable arrays as
outputs. Basically, what I do is:
subroutine MySub(N, MyInput, MyOutput)
integer(N), intent(in) :: Input
real(4), allocatable, intent(out) :: MyOutput
! So some processing on a file to get NOUT = size(MyOutput)
! Allocate the output vector
! Fill the output vector by reading data from a file
end subroutine MySub
Well, Python always returns me the error message:
array_from_pyobj:intent(hide) must have defined dimensions.
rank=1 dimensions=[ -1 ]
_opt.error: failed in converting hidden `MyOutput' of _opt.solve to
Is there a way I can have an allocatable array as output? This is :
- Intel Visual Fortran 9.0 (I also have Compaq 6.5)
- Windows XP
- Python 2.3.5
- f2py 2.45.241_1926
Thank you very much for your suggestions.
"Imagination Is The Only Weapon In The War Against Reality."
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the f2py-users