[SciPy-Dev] f2py, the fortran integer type, and npy_intp
Sturla Molden
sturla at molden.no
Sat Jul 10 17:49:44 EDT 2010
Charles R Harris skrev:
> I note that some c programs try to call f2py generated fortran
> interfaces using the npy_intp type for the array dimension. There are
> two problems here, first the prototype for the generated wrapper uses
> int causing compiler warnings on a 64 bit os, and second, the fortran
> subroutines themselves use integer types. So some questions. What
> precision are fortran integers?
Precision is determined by the kind number, which is implementation
dependent. In other words, "you cannot know". The only portable solution
to this is to use Fortran 2003 C bindings. The Fortran compiler knows
it's own internal details.
Sturla
More information about the SciPy-Dev
mailing list