diff options
author | Charles Harris <charlesr.harris@gmail.com> | 2018-11-09 20:07:16 -0600 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-11-09 20:07:16 -0600 |
commit | d0e2f1ac0c0fb4aaf791c9082cff1d6b04545410 (patch) | |
tree | f8df1a80711770626f8953b218aefa6b773e1d43 /doc | |
parent | d50484a0c936a6ad3fdc9a0ee08b03e1f4cdc2db (diff) | |
parent | 08a2e4503de155f2e202bc154287b34220ad1025 (diff) | |
download | numpy-d0e2f1ac0c0fb4aaf791c9082cff1d6b04545410.tar.gz |
Merge pull request #11916 from mattip/deprecate-set_numeric_ops
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 bb2b17782..3e00e4410 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 85814f5a9..76aa680ae 100644 --- a/doc/source/reference/c-api.array.rst +++ b/doc/source/reference/c-api.array.rst @@ -3217,12 +3217,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 |