diff options
author | mattip <matti.picus@gmail.com> | 2018-09-09 09:44:31 +0300 |
---|---|---|
committer | mattip <matti.picus@gmail.com> | 2018-10-21 18:12:09 +0300 |
commit | 73c5a5aca2c17505ae352b94ebd5043e5df80f14 (patch) | |
tree | 3234b269c70ddb978582b88c9743d779a3919ed6 /doc | |
parent | 28b3694aa1eeeaa75068436b79a87a296545fea4 (diff) | |
download | numpy-73c5a5aca2c17505ae352b94ebd5043e5df80f14.tar.gz |
DEP: deprecate np.set_numeric_ops and friends
Diffstat (limited to 'doc')
-rw-r--r-- | doc/release/1.16.0-notes.rst | 9 | ||||
-rw-r--r-- | doc/source/reference/arrays.ndarray.rst | 2 | ||||
-rw-r--r-- | doc/source/reference/c-api.array.rst | 4 |
3 files changed, 13 insertions, 2 deletions
diff --git a/doc/release/1.16.0-notes.rst b/doc/release/1.16.0-notes.rst index 599123f97..73c4b52c7 100644 --- a/doc/release/1.16.0-notes.rst +++ b/doc/release/1.16.0-notes.rst @@ -4,7 +4,7 @@ NumPy 1.16.0 Release Notes This NumPy release is the last one to support Python 2.7. It will be maintained as a long term release with bug fixes only through 2020. To that end, the -planned code reorganization detailed in NEP-0015 has been made in order to +planned code reorganization detailed in `NEP 15`_ has been made in order to facilitate backporting fixes from future releases, which will now have the same code organization. @@ -41,6 +41,13 @@ These were deprecated in 1.10, had no tests, and seem to no longer work in It is an alias to the more powerful `numpy.ndarray.item`, not tested, and fails for scalars. +`np.set_array_ops` and `np.get_array_ops` have been deprecated +-------------------------------------------------------------- +As part of `NEP 15`, they have been deprecated along with the C-API functions +:c:func:`PyArray_SetNumericOps` and :c:func:`PyArray_GetNumericOps`. Users who wish to override +the inner loop functions in built-in ufuncs should use +:c:func:`PyUFunc_ReplaceLoopBySignature`. + Future Changes ============== diff --git a/doc/source/reference/arrays.ndarray.rst b/doc/source/reference/arrays.ndarray.rst index 4c8bbf66d..306d22f43 100644 --- a/doc/source/reference/arrays.ndarray.rst +++ b/doc/source/reference/arrays.ndarray.rst @@ -517,7 +517,7 @@ Arithmetic: ``__r{op}__`` special methods are not directly defined. - The functions called to implement many arithmetic special methods - for arrays can be modified using :func:`set_numeric_ops`. + for arrays can be modified using :class:`__array_ufunc__ <numpy.class.__array_ufunc__>`. Arithmetic, in-place: diff --git a/doc/source/reference/c-api.array.rst b/doc/source/reference/c-api.array.rst index 9265b1a97..3d7e65415 100644 --- a/doc/source/reference/c-api.array.rst +++ b/doc/source/reference/c-api.array.rst @@ -3209,12 +3209,16 @@ Internal Flexibility setting a Python Error) if one of the objects being assigned is not callable. + .. deprecated:: 1.16 + .. c:function:: PyObject* PyArray_GetNumericOps(void) Return a Python dictionary containing the callable Python objects stored in the internal arithmetic operation table. The keys of this dictionary are given in the explanation for :c:func:`PyArray_SetNumericOps`. + .. deprecated:: 1.16 + .. c:function:: void PyArray_SetStringFunction(PyObject* op, int repr) This function allows you to alter the tp_str and tp_repr methods |