Re: [f2py] f2py-users Digest, Vol 65, Issue 5
Juergen Wieferink <[email protected]>
| Newsgroups | gmane.comp.python.f2py.user |
|---|---|
| Message-ID | <[email protected]> |
Hi all, Brandt Belson wrote: > import testarrays > from numpy import * > nx = 2 > ny = 3 > a=zeros((nx,ny)) > b=zeros((nx,ny)) > a=testarrays.testarrays(a,b,nx,ny) > print a > print b You create the arrays by "numpy.zeros((...))", which defaults to row-major (C ordering). Simply use "numpy.zeros((...), order='F')" to get column-major arrays (Fortran ordering). Then there should be no need to copy and transpose the matrices. Juergen