summaryrefslogtreecommitdiff
path: root/numpy/lib/tests/test_mixins.py
diff options
context:
space:
mode:
authorStephan Hoyer <shoyer@gmail.com>2017-04-24 13:58:49 -0700
committerCharles Harris <charlesr.harris@gmail.com>2017-04-27 13:37:51 -0600
commit3272a860129a7192a0e499c59e273da3dd35d998 (patch)
tree3733e47e5130cc705bf2c9ef62af9dbe61f028a8 /numpy/lib/tests/test_mixins.py
parent256a8ae75fc36f7d4531557f9572a046508afa07 (diff)
downloadnumpy-3272a860129a7192a0e499c59e273da3dd35d998.tar.gz
ENH: Better error message for __array_ufunc__ not implemented
* ENH: Better error message for __array_ufunc__ not implemented New behavior: >>> import numpy as np >>> class Dummy: ... def __array_ufunc__(self, *args, **kwargs): ... return NotImplemented >>> np.negative(Dummy()) TypeError: operand type(s) do not implement __array_ufunc__( <ufunc 'negative'>, '__call__', <__main__.Dummy object at 0x1106df8d0>): 'Dummy' * check for null errmsg_formatter
Diffstat (limited to 'numpy/lib/tests/test_mixins.py')
0 files changed, 0 insertions, 0 deletions