diff options
author | Allan Haldane <ealloc@gmail.com> | 2018-10-25 14:04:31 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-10-25 14:04:31 -0400 |
commit | 872372bd56ccb5fe98faae8be7d14e4a8c69e037 (patch) | |
tree | 9cf7e8a349b5f5c792d2cb63fb6fb627de6860a6 /numpy/core/numeric.py | |
parent | 8aa121415760cc6839a546c3f84e238d1dfa1aa6 (diff) | |
parent | 9660f011e126e60e76ce8925686f59c8a4d1d00a (diff) | |
download | numpy-872372bd56ccb5fe98faae8be7d14e4a8c69e037.tar.gz |
Merge pull request #12251 from shoyer/array-function-error-msg
MAINT: improved error message when no __array_function__ implementation found
Diffstat (limited to 'numpy/core/numeric.py')
-rw-r--r-- | numpy/core/numeric.py | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/numpy/core/numeric.py b/numpy/core/numeric.py index 6e4e585c3..5d82bbd8d 100644 --- a/numpy/core/numeric.py +++ b/numpy/core/numeric.py @@ -6,6 +6,7 @@ try: import collections.abc as collections_abc except ImportError: import collections as collections_abc +import functools import itertools import operator import sys @@ -27,8 +28,8 @@ from .multiarray import ( if sys.version_info[0] < 3: from .multiarray import newbuffer, getbuffer +from . import overrides from . import umath -from .overrides import array_function_dispatch from .umath import (multiply, invert, sin, UFUNC_BUFSIZE_DEFAULT, ERR_IGNORE, ERR_WARN, ERR_RAISE, ERR_CALL, ERR_PRINT, ERR_LOG, ERR_DEFAULT, PINF, NAN) @@ -55,6 +56,10 @@ else: import __builtin__ as builtins +array_function_dispatch = functools.partial( + overrides.array_function_dispatch, module='numpy') + + def loads(*args, **kwargs): # NumPy 1.15.0, 2017-12-10 warnings.warn( |