diff options
| -rw-r--r-- | doc/source/reference/c-api/array.rst | 14 | ||||
| -rw-r--r-- | doc/source/user/c-info.beyond-basics.rst | 4 | ||||
| -rw-r--r-- | numpy/core/include/numpy/ndarraytypes.h | 3 |
3 files changed, 12 insertions, 9 deletions
diff --git a/doc/source/reference/c-api/array.rst b/doc/source/reference/c-api/array.rst index c7a2576c0..909f9ec53 100644 --- a/doc/source/reference/c-api/array.rst +++ b/doc/source/reference/c-api/array.rst @@ -151,6 +151,16 @@ and its sub-types). `numpy.ndarray.item` is identical to PyArray_GETITEM. +.. c:function:: int PyArray_FinalizeFunc(PyArrayObject* arr, PyObject* obj) + + The function pointed to by the CObject + :obj:`~numpy.class.__array_finalize__`. + The first argument is the newly created sub-type. The second argument + (if not NULL) is the "parent" array (if the array was created using + slicing or some other operation where a clearly-distinguishable parent + is present). This routine can do anything it wants to. It should + return a -1 on error and 0 otherwise. + Data access ^^^^^^^^^^^ @@ -2562,10 +2572,6 @@ Broadcasting (multi-iterators) through all of the elements (of the broadcasted result), otherwise it evaluates FALSE. -.. c:function:: int PyArray_MultiIter_SIZE(PyObject* multi) - - Returns the size of the multi-iterator object. - .. c:function:: int PyArray_Broadcast(PyArrayMultiIterObject* mit) This function encapsulates the broadcasting rules. The *mit* diff --git a/doc/source/user/c-info.beyond-basics.rst b/doc/source/user/c-info.beyond-basics.rst index 4422a2d40..121384d04 100644 --- a/doc/source/user/c-info.beyond-basics.rst +++ b/doc/source/user/c-info.beyond-basics.rst @@ -472,8 +472,8 @@ The __array_finalize\__ method members are filled in. Finally, the :obj:`~numpy.class.__array_finalize__` attribute is looked-up in the object dictionary. If it is present and not None, then it can be either a CObject containing a pointer - to a ``PyArray_FinalizeFunc`` or it can be a method taking a - single argument (which could be None). + to a :c:func:`PyArray_FinalizeFunc` or it can be a method taking a + single argument (which could be None) If the :obj:`~numpy.class.__array_finalize__` attribute is a CObject, then the pointer must be a pointer to a function with the signature: diff --git a/numpy/core/include/numpy/ndarraytypes.h b/numpy/core/include/numpy/ndarraytypes.h index 360c1c59d..5acd24a7e 100644 --- a/numpy/core/include/numpy/ndarraytypes.h +++ b/numpy/core/include/numpy/ndarraytypes.h @@ -1308,9 +1308,6 @@ typedef struct { #define PyArray_MultiIter_NOTDONE(multi) \ (_PyMIT(multi)->index < _PyMIT(multi)->size) -#define PyArray_MultiIter_SIZE(multi) \ - _PyMIT(multi)->size - /* * Store the information needed for fancy-indexing over an array. The * fields are slightly unordered to keep consec, dataptr and subspace |
