[Numpy-discussion] f2py with allocatable arrays

Ondřej Čertík ondrej.certik@gmail....
Thu Jul 5 18:03:17 CDT 2012

On Tue, Jul 3, 2012 at 9:51 PM, Paul Anton Letnes
<paul.anton.letnes@gmail.com> wrote:
> On 4. juli 2012, at 02:23, Sturla Molden wrote:
>> Den 03.07.2012 20:38, skrev Casey W. Stark:
>>> Sturla, this is valid Fortran, but I agree it might just be a bad
>>> idea. The Fortran 90/95 Explained book mentions this in the
>>> allocatable dummy arguments section and has an example using an array
>>> with allocatable, intent(out) in a subrountine. You can also see this
>>> in the PDF linked from
>>> http://fortranwiki.org/fortran/show/Allocatable+enhancements.
>> Ok, so it's valid Fortran 2003. I never came any longer than to Fortran
>> 95 :-) Make sure any Fortran code using this have the extension .f03 --
>> not .f95 or .f90 -- or it might crash horribly.
> To be pedantic: to my knowledge, the common convention is .f for fixed and .f for free form source code. As is stated in the link, "..the Fortran standard itself does not define any extension..."

I assume you meant ".f for fixed and .f90 for free form"

> http://fortranwiki.org/fortran/show/File+extensions
> As one example, ifort doesn't even want to read files with the .f95 suffix. You'll have to pass it a flag stating that "yep, that's a fortran file all right".


> I use the .f90 suffix everywhere, but maybe that's just me.

Exactly, the same here.


More information about the NumPy-Discussion mailing list