Re: [Numpy-discussion] C-API: multidimensional array indexing?

2016-03-31 Thread mpc
Cool! But I'm having trouble implementing this, could you provide an example on how exactly to do this? I'm not sure how to create the appropriate tuple and how to use it with PyObject_GetItem given an PyArrayObject, unless I'm misunderstood. Much appreciated, Matthew -- View this message in

[Numpy-discussion] C-API: multidimensional array indexing?

2011-07-27 Thread Johann Bauer
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

Re: [Numpy-discussion] C-API: multidimensional array indexing?

2011-07-27 Thread Johann Bauer
Thanks, Mark! Problem solved. Johann ___ NumPy-Discussion mailing list NumPy-Discussion@scipy.org http://mail.scipy.org/mailman/listinfo/numpy-discussion