[Numpy-discussion] arrays : c aligmen to fortran and back

Thomas Hrabe thrabe@burnham....
Sun Aug 3 23:37:59 CDT 2008


Hi all,

I need to convert a 3d array from c alingment to fortran and was wandering for the simplest code available. 
Its all about python and an interfaced C++ program, which, however, processes fortran aligned arrays.

Is there a simple code from converting an array
arr = numpy.array((30,20,10))

to an array arr2 with the same shape 
(arr.shape == arr2.shape)  = true
where the data is aligned in fortran style.

Furthermore, has anybody ever seen a C library which converts arrays from C alignment  to Fortran without swapping the dimensions ([30,20,10] to [10,20,30]). 


Thank you in advance for your help,
Thomas
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://projects.scipy.org/pipermail/numpy-discussion/attachments/20080803/fc7273ed/attachment-0001.html 


More information about the Numpy-discussion mailing list