summaryrefslogtreecommitdiff
path: root/numpy/core/_internal.py
diff options
context:
space:
mode:
authorEric Wieser <wieser.eric@gmail.com>2017-05-10 14:38:16 +0100
committerEric Wieser <wieser.eric@gmail.com>2017-05-10 15:24:48 +0100
commit5bf2a79f939bf46fa76b127c7fa09db0e235475b (patch)
tree27288997fa6b5410c8bb5d9129882f898b73b56b /numpy/core/_internal.py
parentccfa36c0e008e21ab0d1d5822197cb490615d6b6 (diff)
downloadnumpy-5bf2a79f939bf46fa76b127c7fa09db0e235475b.tar.gz
BUG: Fix inconsistent lookup of __array_ufunc__.
Previously, we would check if the attribute existed on the class, yet use it from the instance. This also cuts 3 lookups of `__array_ufunc__` down to one.
Diffstat (limited to 'numpy/core/_internal.py')
-rw-r--r--numpy/core/_internal.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/numpy/core/_internal.py b/numpy/core/_internal.py
index f7f579c75..10fcbfdfe 100644
--- a/numpy/core/_internal.py
+++ b/numpy/core/_internal.py
@@ -688,7 +688,7 @@ class AxisError(ValueError, IndexError):
super(AxisError, self).__init__(msg)
-def array_ufunc_errmsg_formatter(ufunc, method, *inputs, **kwargs):
+def array_ufunc_errmsg_formatter(dummy, ufunc, method, *inputs, **kwargs):
""" Format the error message for when __array_ufunc__ gives up. """
args_string = ', '.join(['{!r}'.format(arg) for arg in inputs] +
['{}={!r}'.format(k, v)