Fortran comparison Re: [SciPy-dev] scipy.weave versus simple C++.

Prabhu Ramachandran prabhu at
Sat Jan 12 22:05:29 CST 2002

>>>>> "PP" == Pearu Peterson <pearu at> writes:

    PP> 1) Build fortran wrapper: f2py -c flaplace.f -m flaplace #
    PP> here you need f2py from CVS

I've been having a hard time getting my version of f2py (2.5.391) to
do this but cant seem to get it right.  Does f2py 2.5.393 have this
feature or is the CVS version absolutely necessary?

    PP> As a result you'll get in the current directory.

Also what about the transposing of the arrays??  Eric was talking
about transposing the array.  I quickly read some of your examples and
internally you seem to do the necessary adjustments (swapping n and m)
to get the right array, right?  If so, technically the result of your
fortran code should be identical to the c++ version?  Please remember
that the order of execution is important, i.e. the array must be
accessed in the same sequence if not the intermediate step results
will be different.  However, both versions will converge but I'm just
curious about the intermediate steps too.

My apologies if these questions sound dumb but I come from a C
background with very little fortran experience.  I'll learn fortran
soon though, not because its faster but because I believe that its
worth knowing.


More information about the Scipy-dev mailing list