numpy  2.0.0
src/multiarray/refcount.h File Reference

Go to the source code of this file.

Functions

NPY_NO_EXPORT void PyArray_Item_INCREF (char *data, PyArray_Descr *descr)
NPY_NO_EXPORT void PyArray_Item_XDECREF (char *data, PyArray_Descr *descr)
NPY_NO_EXPORT int PyArray_INCREF (PyArrayObject *mp)
NPY_NO_EXPORT int PyArray_XDECREF (PyArrayObject *mp)
NPY_NO_EXPORT void PyArray_FillObjectArray (PyArrayObject *arr, PyObject *obj)

Function Documentation

NPY_NO_EXPORT void PyArray_FillObjectArray ( PyArrayObject arr,
PyObject *  obj 
)
Assumes contiguous
Used for arrays of python objects to increment the reference count of
every python object in the array.
For object arrays, increment all internal references.

<

handles misaligned data too

References PyArrayIterObject_tag::dataptr, PyArray_DESCR, PyArray_Item_INCREF(), and PyArray_ITER_NEXT.

Referenced by PyArray_TakeFrom().

NPY_NO_EXPORT void PyArray_Item_INCREF ( char *  data,
PyArray_Descr descr 
)
Incref all objects found at this record

Referenced by PyArray_INCREF().

NPY_NO_EXPORT void PyArray_Item_XDECREF ( char *  data,
PyArray_Descr descr 
)
XDECREF all objects found at this record
Decrement all internal references for object arrays.
(or arrays with object fields)

<

handles misaligned data too