[SciPy-Dev] f2py, the fortran integer type, and npy_intp

Sturla Molden sturla@molden...
Mon Jul 12 11:38:04 CDT 2010

Den 12.07.2010 18:10, skrev Kurt Smith:
>               1
> Error: Type mismatch in argument 'arr' at (1); passed INTEGER(8) to INTEGER(4)
> But perhaps I misunderstand you.

Damn... I really thought the compiler would do the conversion :(

Ok, another suggestion:
Write a small Fortran 2003 routine that returns the size of (compiler 
dependent) Fortran types to C, and do the conversion manually in C.

Or start a Herculean effort and convert the old Fortran codes. Anyone 
feel like writing a FORTRAN IV compiler in Python? ;)


More information about the SciPy-Dev mailing list