[SciPy-dev] Python/Fortran multi-dimensional array issues

Pearu Peterson pearu at cens.ioc.ee
Thu Jan 17 00:18:18 EST 2002


On Thu, 17 Jan 2002, Prabhu Ramachandran wrote:

> >>>>> "PP" == Pearu Peterson <pearu at cens.ioc.ee> writes:
> 
>     PP> ! >>> print fun.foo(a) !  F77: !  m= 2, n= 3 !  Row 1: !  a(i=
>     PP> 1,j= 1) = 1 !  a(i= 1,j= 2) = 2 !  a(i= 1,j= 3) = 3 !  Row 2:
>     PP> !  a(i= 2,j= 1) = 4 !  a(i= 2,j= 2) = 5 !  a(i= 2,j= 3) = 6 !
>     PP> [[77777 2 3] !  [ 4 5 6]]
>         ^^^^^^^^^
> 
> I just hope that is a typo. :)

No, it is not a typo. The example is real, not typed in.

If you look at the Fortran file foo.f then you see that after printing the
data to standard output, the first element is set to 77777. It just for
demostrating data flow from Fortran to Python.

Pearu




More information about the SciPy-Dev mailing list