NumPy C-API - copying from Fortran to C order
12 Aug
2009
12 Aug
'09
4:48 p.m.
Hi, I am working on a *very* simple Python interface to ScaLAPACK using the NumPy C-API. I am not using f2py at all. Simple question: How can I copy a C-order NumPy array into a Fortran-order NumPy array within the C-API? (This is trivial in Python, it is simply A = A.copy("Fortran")) I would like to do this with the minimal amount of memory use. The matrices are 2-d and rectangular, but not square. It looks like I use PyArray_CopyInto or PyArray_MoveInto, but I would need to create another array using PyArray_EMPTY(2, dims, NPY_DOUBLE, NPY_F_CONTIGUOUS) Thanks in advance for your assistance. -- Nichols A. Romero, Ph.D. Argonne Leadership Computing Facility Argonne, IL 60490 (630) 252-3441 (O) (630) 470-0462 (C)
5549
Age (days ago)
5549
Last active (days ago)
0 comments
1 participants
participants (1)
-
Nichols A. Romero