From 88c789a30d1c4b558d579d9e22163be857a5aae4 Mon Sep 17 00:00:00 2001 From: Sebastian Berg Date: Fri, 31 Mar 2023 07:15:03 +0200 Subject: DOC: Remove doc for non-existing `PyArray_XDECREF_ERR` The macro was removed, this is just a left over. --- doc/source/reference/c-api/array.rst | 12 ------------ 1 file changed, 12 deletions(-) diff --git a/doc/source/reference/c-api/array.rst b/doc/source/reference/c-api/array.rst index 79949acc7..a787c7ac1 100644 --- a/doc/source/reference/c-api/array.rst +++ b/doc/source/reference/c-api/array.rst @@ -3619,18 +3619,6 @@ Miscellaneous Macros error when you are finished with ``obj``, just before ``Py_DECREF(obj)``. It may be called multiple times, or with ``NULL`` input. -.. c:function:: void PyArray_XDECREF_ERR(PyObject* obj) - - Deprecated in 1.14, use :c:func:`PyArray_DiscardWritebackIfCopy` - followed by ``Py_XDECREF`` - - DECREF's an array object which may have the - :c:data:`NPY_ARRAY_WRITEBACKIFCOPY` - flag set without causing the contents to be copied back into the - original array. Resets the :c:data:`NPY_ARRAY_WRITEABLE` flag on the base - object. This is useful for recovering from an error condition when - writeback semantics are used, but will lead to wrong results. - Enumerated Types ~~~~~~~~~~~~~~~~ -- cgit v1.2.1 From 37030d8a91f10752689c05ca3385845a89e2a965 Mon Sep 17 00:00:00 2001 From: Sebastian Berg Date: Fri, 31 Mar 2023 07:31:32 +0200 Subject: DOC: Also delete PyArray_GetArrayParamsFromObject --- doc/source/reference/c-api/array.rst | 16 ---------------- 1 file changed, 16 deletions(-) diff --git a/doc/source/reference/c-api/array.rst b/doc/source/reference/c-api/array.rst index a787c7ac1..8a34c4231 100644 --- a/doc/source/reference/c-api/array.rst +++ b/doc/source/reference/c-api/array.rst @@ -548,22 +548,6 @@ From other objects :c:data:`NPY_ARRAY_F_CONTIGUOUS` \| :c:data:`NPY_ARRAY_WRITEABLE` \| :c:data:`NPY_ARRAY_ALIGNED` \| :c:data:`NPY_ARRAY_WRITEBACKIFCOPY` -.. c:function:: int PyArray_GetArrayParamsFromObject( \ - PyObject* op, PyArray_Descr* requested_dtype, npy_bool writeable, \ - PyArray_Descr** out_dtype, int* out_ndim, npy_intp* out_dims, \ - PyArrayObject** out_arr, PyObject* context) - - .. deprecated:: NumPy 1.19 - - Unless NumPy is made aware of an issue with this, this function - is scheduled for rapid removal without replacement. - - .. versionchanged:: NumPy 1.19 - - `context` is never used. Its use results in an error. - - .. versionadded:: 1.6 - .. c:function:: PyObject* PyArray_CheckFromAny( \ PyObject* op, PyArray_Descr* dtype, int min_depth, int max_depth, \ int requirements, PyObject* context) -- cgit v1.2.1 From 55f2891b263acacc93577936f2a516dc215a61d4 Mon Sep 17 00:00:00 2001 From: Sebastian Berg Date: Fri, 31 Mar 2023 07:46:06 +0200 Subject: DOC: PyArray_ArrayType doesn't exist --- doc/source/reference/c-api/array.rst | 11 ----------- 1 file changed, 11 deletions(-) diff --git a/doc/source/reference/c-api/array.rst b/doc/source/reference/c-api/array.rst index 8a34c4231..ed6d6fb6b 100644 --- a/doc/source/reference/c-api/array.rst +++ b/doc/source/reference/c-api/array.rst @@ -1186,17 +1186,6 @@ Converting data types return value is the enumerated typenumber that represents the data-type that *op* should have. -.. c:function:: void PyArray_ArrayType( \ - PyObject* op, PyArray_Descr* mintype, PyArray_Descr* outtype) - - This function is superseded by :c:func:`PyArray_ResultType`. - - This function works similarly to :c:func:`PyArray_ObjectType` (...) - except it handles flexible arrays. The *mintype* argument can have - an itemsize member and the *outtype* argument will have an - itemsize member at least as big but perhaps bigger depending on - the object *op*. - .. c:function:: PyArrayObject** PyArray_ConvertToCommonType( \ PyObject* op, int* n) -- cgit v1.2.1 From 37c244de7d6a99e42b733a3fff8c99ec9e3d335e Mon Sep 17 00:00:00 2001 From: Sebastian Berg Date: Fri, 31 Mar 2023 16:28:09 +0200 Subject: MAINT: Also remove XDECREF_ERR from cython `.pyd` --- numpy/__init__.cython-30.pxd | 1 - numpy/__init__.pxd | 1 - 2 files changed, 2 deletions(-) diff --git a/numpy/__init__.cython-30.pxd b/numpy/__init__.cython-30.pxd index ec4c563ad..0dd2fff2b 100644 --- a/numpy/__init__.cython-30.pxd +++ b/numpy/__init__.cython-30.pxd @@ -515,7 +515,6 @@ cdef extern from "numpy/arrayobject.h": void* PyArray_GETPTR3(ndarray m, npy_intp i, npy_intp j, npy_intp k) nogil void* PyArray_GETPTR4(ndarray m, npy_intp i, npy_intp j, npy_intp k, npy_intp l) nogil - void PyArray_XDECREF_ERR(ndarray) # Cannot be supported due to out arg # void PyArray_DESCR_REPLACE(descr) diff --git a/numpy/__init__.pxd b/numpy/__init__.pxd index a6990cc68..47d9294c1 100644 --- a/numpy/__init__.pxd +++ b/numpy/__init__.pxd @@ -473,7 +473,6 @@ cdef extern from "numpy/arrayobject.h": void* PyArray_GETPTR3(ndarray m, npy_intp i, npy_intp j, npy_intp k) nogil void* PyArray_GETPTR4(ndarray m, npy_intp i, npy_intp j, npy_intp k, npy_intp l) nogil - void PyArray_XDECREF_ERR(ndarray) # Cannot be supported due to out arg # void PyArray_DESCR_REPLACE(descr) -- cgit v1.2.1 From b45b8b2b4a6a4a1342add463fd586254753a0989 Mon Sep 17 00:00:00 2001 From: Charles Harris Date: Fri, 31 Mar 2023 17:58:18 -0600 Subject: MAINT: Remove reference to PyArray_GetArrayParamsFromObject --- numpy/core/src/multiarray/ctors.c | 1 - 1 file changed, 1 deletion(-) diff --git a/numpy/core/src/multiarray/ctors.c b/numpy/core/src/multiarray/ctors.c index 84d6e80af..a6335c783 100644 --- a/numpy/core/src/multiarray/ctors.c +++ b/numpy/core/src/multiarray/ctors.c @@ -1919,7 +1919,6 @@ PyArray_FromAny_int(PyObject *op, PyArray_Descr *in_descr, * NPY_ARRAY_FORCECAST will cause a cast to occur regardless of whether or not * it is safe. * - * context is passed through to PyArray_GetArrayParamsFromObject */ /*NUMPY_API -- cgit v1.2.1