[Numpy-discussion] f2py problem with complex inout in subroutine

Mark Bakker markbak@gmail....
Mon Jul 19 03:49:41 CDT 2010


Thanks for fixing this, Pearu.
Complex arrays with intent(inout) don't seem to work either.
They compile, but a problem occurs when calling the routine.
Did you fix that as well?

Here's an example that doesn't work (sorry, I cannot update to svn 8478 on
my machine right now):

    subroutine test3(nlab,omega)
        implicit none
        integer, intent(in) :: nlab
        complex(kind=8), dimension(nlab), intent(inout) :: omega
        integer :: n
        do n = 1,nlab
            omega(n) = cmplx(1,1,kind=8)
        end do
    end subroutine test3


Thanks,

Mark


On 07/09/2010 02:03 PM, Mark Bakker wrote:
>> Hello list. The following subroutine fails to compile with f2py.
>> I use a complex variable with intent(inout). It works fine with two real
>> variables, so I have a workaround, but it would be nicer with a complex
>> variable.
>> Any thoughts on what I am doing wrong?

>compilation failed because of typos in the generated code. This is fixed
>in svn revision 8478.

>Pearu
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.scipy.org/pipermail/numpy-discussion/attachments/20100719/4fcbd795/attachment-0001.html 


More information about the NumPy-Discussion mailing list