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/fromnumeric.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/fromnumeric.py')
-rw-r--r-- | numpy/core/fromnumeric.py | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/numpy/core/fromnumeric.py b/numpy/core/fromnumeric.py index 2fdbf3e23..7dfb52fea 100644 --- a/numpy/core/fromnumeric.py +++ b/numpy/core/fromnumeric.py @@ -3,16 +3,17 @@ """ from __future__ import division, absolute_import, print_function +import functools import types import warnings import numpy as np from .. import VisibleDeprecationWarning from . import multiarray as mu +from . import overrides from . import umath as um from . import numerictypes as nt from .numeric import asarray, array, asanyarray, concatenate -from .overrides import array_function_dispatch from . import _methods _dt_ = nt.sctype2char @@ -32,6 +33,9 @@ _gentype = types.GeneratorType # save away Python sum _sum_ = sum +array_function_dispatch = functools.partial( + overrides.array_function_dispatch, module='numpy') + # functions that are now methods def _wrapit(obj, method, *args, **kwds): |