Re: [Numpy-discussion] String arrays from Python to Fortran

2009-03-23 Thread Sturla Molden
How did you import the function? f2py? What did you put in your .pyf file? > *My Fortran code:* > > subroutine print_string (a, c) > implicit none > character(len=255), dimension(c), intent(inout):: a > integer, intent(in) :: c > integer :: i > do i = 1, size(a) > print*, a(i) > end do > > end

[Numpy-discussion] String arrays from Python to Fortran

2009-03-22 Thread Jared MacCleary
Hi all, No doubt it's a simple fix, but I'm stumped. I've tried several ways to send an array of strings from Python to a Fortran function, but nothing seems to work. I don't know what I'm missing. My Python and Fortran code are very simple. At this point, I'm just trying to get anything to wor