<p dir="ltr">On Apr 4, 2016 1:58 PM, "mpc" <<a href="mailto:matt.p.conte@gmail.com">matt.p.conte@gmail.com</a>> wrote:<br>
><br>
> Thanks for responding.<br>
><br>
> It looks you made/found these yourself since I can't find anything like this<br>
> in the API. I can't believe it isn't, so convenient!<br>
><br>
> By the way, from what I understand, the ':' is represented as<br>
> *PySlice_New(NULL, NULL, NULL) *in the C API when accessing by index,<br>
> correct?<br>
><br>
><br>
> Therefore the final result will be something like:<br>
><br>
> *PyObject* first_column_tuple = PyTuple_New(2);<br>
> PyTuple_SET_ITEM(first_column_tuple, 0, PySlice_New(NULL, NULL, NULL));<br>
> PyTuple_SET_ITEM(first_column_tuple, 1, PyInt_FromLong(0));<br>
> PyObject* first_column_buffer = PyObject_GetItem(src_buffer,<br>
> first_column_tuple);<br>
> *</p>
<p dir="ltr">If this is what your code looks like, then I strongly suspect you'll be better off writing it in cython or even just plain python. The above code won't run any faster than the equivalent code in python, but it's much harder to read and write...</p>
<p dir="ltr">-n</p>