C-API: multidimensional array indexing?
28 Jul
2011
28 Jul
'11
12:37 a.m.
Dear experts, is there a C-API function for numpy which implements Python's multidimensional indexing? Say, I have a 2d-array PyArrayObject * M; and an index int i; how do I extract the i-th row or column M[i,:] respectively M[:,i]? I am looking for a function which gives again a PyArrayObject * and which is a view to M (no copied data; the result should be another PyArrayObject whose data and strides points to the correct memory portion of M). I searched the API documentation, Google and mailing lists for quite a long time but didn't find anything. Can you help me? Thanks, Johann
2920
Age (days ago)
4629
Last active (days ago)
3 comments
3 participants
participants (3)
-
Johann Bauer
-
Mark Wiebe
-
mpc