[Numpy-discussion] f2py pass by reference

Mathew Yeates mat.yeates at gmail.com
Tue Apr 12 14:06:14 EDT 2011


I have
subroutine foo (a)
      integer a
      print*, "Hello from Fortran!"
      print*, "a=",a
      a=2
      end

and from python I want to do
>>> a=1
>>> foo(a)

and I want a's value to now be 2.
How do I do this?

Mathew



More information about the NumPy-Discussion mailing list