<div dir="ltr"><div>Yes, PySlice_New(NULL, NULL, NULL) is the same as ':'.   Depending on what exactly you want to do with the column once you've extracted it, this may not be the best way to do it.  Are you absolutely certain that you actually need a PyArrayObject that points to the column? <br><br></div><div>Eric<br></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Mon, Apr 4, 2016 at 3:59 PM, mpc <span dir="ltr"><<a href="mailto:matt.p.conte@gmail.com" target="_blank">matt.p.conte@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">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>
*<br>
<br>
<br>
<br>
--<br>
View this message in context: <a href="http://numpy-discussion.10968.n7.nabble.com/Multidimension-array-access-in-C-via-Python-API-tp42710p42715.html" rel="noreferrer" target="_blank">http://numpy-discussion.10968.n7.nabble.com/Multidimension-array-access-in-C-via-Python-API-tp42710p42715.html</a><br>
<div class="HOEnZb"><div class="h5">Sent from the Numpy-discussion mailing list archive at Nabble.com.<br>
_______________________________________________<br>
NumPy-Discussion mailing list<br>
<a href="mailto:NumPy-Discussion@scipy.org">NumPy-Discussion@scipy.org</a><br>
<a href="https://mail.scipy.org/mailman/listinfo/numpy-discussion" rel="noreferrer" target="_blank">https://mail.scipy.org/mailman/listinfo/numpy-discussion</a><br>
</div></div></blockquote></div><br></div>