[Numpy-discussion] performing operations in-place in numpy

Pauli Virtanen pav@iki...
Thu Jul 9 04:35:06 CDT 2009

Thu, 09 Jul 2009 10:03:47 +0100, Citi, Luca kirjoitti:
> Excuse me if I insist, PyArray_Conjugate is not the problem. If when
> using the numpy API, it is accepted something like:
>     obj1 = PyArray_CreateSomehowAnArray(....);
>     obj2 = PyArray_DoSomethingWithArray(obj1,...); 
>     obj3 = PyArray_DoSomethingElseWithArray(obj1,...); 
>     Py_DECREF(obj1);
> then there is no way my patch is guaranteed to not break things.

So it seems.

PyUFunc_GenericFunction is a part of the public C-API, so I guess this 
discussion is moot. I doubt we can change ufunc semantics at this point, 
and I don't see ways in which one could distinguish between "temporary 
arrays" and refcount-1 arrays used in extension modules.

Pauli Virtanen

More information about the NumPy-Discussion mailing list