I'm trying to fledge out Cython's numpy.pxd, and have a question:

Is there documentation anywhere, or a simple-to-remember rule, on 
whether the return value of a NumPy C API is incref-ed or not?

E.g. PyArray_BASE, PyArray_DESCR obviously does not incref; while I'm 
assuming that PyArray_New* must incref for successful operation. 
Furthermore PyArray_GETITEM must also incref.

This kind of a priori guessing and source inspection gets tiresome for 
the hundreds of functions I must cover though...

-- 
Dag Sverre
_______________________________________________
Numpy-discussion mailing list
Numpy-discussion@scipy.org
http://mail.scipy.org/mailman/listinfo/numpy-discussion

Reply via email to