[Numpy-discussion] PyArray_FromAny() steals a reference to PyArray_Descr* dtype

Larsen, Brian A balarsen@lanl....
Wed Feb 15 16:23:51 CST 2012

Hello all,

the docs are unclear as to the reference counting on the inputs to the numpy C function PyArray_FromAny().

multiarraymodule.c in the PyArray_InnerProduct() code seems to imply that a reference to dtype is stolen in the PyArray_FromAny process.  Meaning that I don't need/can't have a Py_DECREF().

Can anyone confirm this?

Thanks much,



Brian A. Larsen
ISR-1 Space Science and Applications
Los Alamos National Laboratory
PO Box 1663, MS-D466
Los Alamos, NM 87545

(For overnight add:
SM-30, Bikini Atoll Road)

Phone: 505-665-7691
Fax:   505-665-7395
email: balarsen@lanl.gov<mailto:balarsen@lanl.gov>

Correspondence /
Technical data or Software Publicly Available

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.scipy.org/pipermail/numpy-discussion/attachments/20120215/0bb23bce/attachment-0001.html 

More information about the NumPy-Discussion mailing list