![]() | Instead of editing the interface file, we can add
special F2PY comments in the Fortran source code:
subroutine somef(i1, i2, o1, o2, o3, o4, io1) real*8 i1, i2, o1, o2, o3, o4, io1 Cf2py intent(in) i1 Cf2py intent(in) i2 Cf2py intent(out) o1 Cf2py intent(out) o2 Cf2py intent(out) o3 Cf2py intent(out) o4 Cf2py intent(in,out) io1 |
![]() | Now a single F2PY command generates correct interface:
f2py -m hw -c hw.f |