subroutine test(in) real, dimension(:), intent(in) :: in real, intent(out) :: out(size(in)) out = in*5.0
$ f2py -c -m mytest test.f90
import mytest out = mytest.test(in)
$ f2py -c --help-fcompiler
$ f2py -fcompiler=gnu