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
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.