8000 ENH: Use `__array_ufunc__ = None` in polynomial convenience classes. by charris · Pull Request #9015 · numpy/numpy · GitHub
[go: up one dir, main page]

Skip to content

ENH: Use __array_ufunc__ = None in polynomial convenience classes. #9015

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Apr 29, 2017
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
DOC: Document that the polynomial classes now opt out of ufuncs.
  • Loading branch information
charris committed Apr 28, 2017
commit 21b14aad410ad3b40e1609ec2cbed553e3f18c47
7 changes: 7 additions & 0 deletions doc/release/1.13.0-notes.rst
Original file line number Diff line number Diff line change
Expand Up @@ -415,3 +415,10 @@ greater than ``mmap.ALLOCATIONGRANULARITY``.
Previously, ``np.real`` and ``np.imag`` used to return array objects when
provided a scalar input, which was inconsistent with other functions like
``np.angle`` and ``np.conj``.

The polynomial convenience classes cannot be passed to ufuncs
-------------------------------------------------------------
The ABCPolyBase class, from which the convenience classes are derived, sets
``__array_ufun__ = None`` in order of opt out of ufuncs. If a polynomial
convenience class instance is passed as an argument to a ufunc, a ``TypeError``
will now be raised.
0