Re: [f2py] "natural" Fortran calling conventions?
Pearu Peterson <[email protected]>
| Newsgroups | gmane.comp.python.f2py.user |
|---|---|
| Message-ID | <[email protected]> |
Thomas Breuel wrote: > Hi, > > It seems like f2py only offers copying (in, out, inout), or in-place > reordering (inplace), but it doesn't offer the simplest case, namely > just leaving the array alone and reversing the order of the indexes that > the programmer sees. > > Is there some way in which I can get f2py to use "natural" calling > conventions between Python and Fortran, something that always leaves the > array data alone? By that I mean that I pass an array in such a way > that "a[i,j]" is accessed as "a(j+1,i+1)" in Fortran. Yes, use intent(cache). Then f2py just passes the array to Fortran without any checks and transformations. HTH, Pearu