diff options
author | Stephan Hoyer <shoyer@google.com> | 2018-11-10 16:12:18 -0800 |
---|---|---|
committer | Stephan Hoyer <shoyer@google.com> | 2018-11-10 16:12:18 -0800 |
commit | b44284ebc42c496e5c5d906acc33ebbc337fd3b1 (patch) | |
tree | 52322a497bc9c0def2065c48ce0c00e8eee750a3 /numpy/core/arrayprint.py | |
parent | 56ce2327462eb9e3980c568ce9be628892aad89f (diff) | |
download | numpy-b44284ebc42c496e5c5d906acc33ebbc337fd3b1.tar.gz |
MAINT: more fixes for disabling overrides
Diffstat (limited to 'numpy/core/arrayprint.py')
-rw-r--r-- | numpy/core/arrayprint.py | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/numpy/core/arrayprint.py b/numpy/core/arrayprint.py index ccc1468c4..b578fab54 100644 --- a/numpy/core/arrayprint.py +++ b/numpy/core/arrayprint.py @@ -1547,10 +1547,12 @@ def array_str(a, max_line_width=None, precision=None, suppress_small=None): a, max_line_width, precision, suppress_small) +# needed if __array_function__ is disabled +_array2string_impl = getattr(array2string, '__wrapped__', array2string) _default_array_str = functools.partial(_array_str_implementation, - array2string=array2string.__wrapped__) + array2string=_array2string_impl) _default_array_repr = functools.partial(_array_repr_implementation, - array2string=array2string.__wrapped__) + array2string=_array2string_impl) def set_string_function(f, repr=True): |