[f2py] "natural" Fortran calling conventions?
Thomas Breuel <[email protected]>
| Newsgroups | gmane.comp.python.f2py.user |
|---|---|
| Message-ID | <[email protected]> |
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. The current calling conventions seem to be going through a lot of trouble to reorder the data in a way that then makes accesses particularly inefficient from Fortran, just so that the order of the indexes stays the same. Most performance critical code will naturally use the reverse order of indexes in Fortran and Python/C code anyway, since the decision of where to put the indexes will be driven by which index varies fastest, not by which position the index should be in. Tom _______________________________________________ f2py-users mailing list f2py-users-Y4l6ocDipWCuvFJfX82//[email protected] http://cens.ioc.ee/mailman/listinfo/f2py-users