I have put together a few c extensions following the documentation on
http://www.scipy.org/Cookbook/C_Extensions/NumPy_arrays. There is however
one thing that stumps me.
To illustrate with a simple code snippet, the test function below
multiplies the input numpy double array by two. So far so good
After diving deeper in the docs I found the PyTuple_New alternative to
building tuples instead of Py_BuildValue. It seems to work fine.
But I am unsure of the INCREF/DECREF refcounting thing. Will I need any of
those in the code below?
Also, for generic c extensions, how can I check the refcounts
sorry to be a proselytizer, but this would be trivial with Cython:
http://cython.org/
-Chris
On Tue, Dec 27, 2011 at 1:52 AM, Åke Kullenberg
wrote:
> After diving deeper in the docs I found the PyTuple_New alternative to
> building tuples instead of Py_BuildValue. It seems to work fine.
>
> Bu