diff options
author | Charles Harris <charlesr.harris@gmail.com> | 2017-03-30 20:51:09 -0600 |
---|---|---|
committer | Charles Harris <charlesr.harris@gmail.com> | 2017-04-27 21:16:55 -0600 |
commit | c7f7199fe9907ab94024a422e626affcf1a64d14 (patch) | |
tree | e90c1f9cb0219fe5fb3de1b1008a135d1a6b7208 /numpy/polynomial/_polybase.py | |
parent | e4f756be30c5c431550426b4404ac508ddf0fb40 (diff) | |
download | numpy-c7f7199fe9907ab94024a422e626affcf1a64d14.tar.gz |
ENH: Use `__array_ufunc__ = None` in polynomial convenience classes.
Add `__array_ufunc__ = None` to ABCPolyBase. This ensures that polynomial
convenience classes will not participate in ufuncs and will have priority
when combined with an ndarray in a Python binary operator.
`__array_priority__` is removed, as it is no longer needed.
Diffstat (limited to 'numpy/polynomial/_polybase.py')
-rw-r--r-- | numpy/polynomial/_polybase.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/numpy/polynomial/_polybase.py b/numpy/polynomial/_polybase.py index aad147388..39f5fac31 100644 --- a/numpy/polynomial/_polybase.py +++ b/numpy/polynomial/_polybase.py @@ -64,8 +64,8 @@ class ABCPolyBase(object): # Not hashable __hash__ = None - # Don't let participate in array operations. Value doesn't matter. - __array_priority__ = 1000 + # Opt out of numpy ufuncs and Python ops with ndarray subclasses. + __array_ufunc__ = None # Limit runaway size. T_n^m has degree n*m maxpower = 100 |