diff options
author | Stephan Hoyer <shoyer@google.com> | 2019-01-22 14:07:47 -0800 |
---|---|---|
committer | Stephan Hoyer <shoyer@google.com> | 2019-01-22 14:13:39 -0800 |
commit | 96d179ce5bd0e3f75508f6afdfb2fb65170cc83c (patch) | |
tree | eda5cca68be758029c47c10252d7a59189935c3f /numpy/core/shape_base.py | |
parent | 3cbc11ac56054ad3ac7461e57433aefe37f2e3e4 (diff) | |
download | numpy-96d179ce5bd0e3f75508f6afdfb2fb65170cc83c.tar.gz |
ENH: __array_function__ updates for NumPy 1.17.0
- Always enable __array_function__ overrides.
- Remove special cases for Python 2 compatibility.
- Document these changes in 1.17.0-notes.rst.
It will be good to see ASV numbers to understand the performance implications
of these changes. If need be, we can speed up NumPy functions internally by
using non-dispatched functions (with ``.__wrapped__``).
Diffstat (limited to 'numpy/core/shape_base.py')
-rw-r--r-- | numpy/core/shape_base.py | 8 |
1 files changed, 0 insertions, 8 deletions
diff --git a/numpy/core/shape_base.py b/numpy/core/shape_base.py index f8332c362..08e07bb66 100644 --- a/numpy/core/shape_base.py +++ b/numpy/core/shape_base.py @@ -217,11 +217,6 @@ def _arrays_for_stack_dispatcher(arrays, stacklevel=4): return arrays -def _warn_for_nonsequence(arrays): - if not overrides.ENABLE_ARRAY_FUNCTION: - _arrays_for_stack_dispatcher(arrays, stacklevel=4) - - def _vhstack_dispatcher(tup): return _arrays_for_stack_dispatcher(tup) @@ -279,7 +274,6 @@ def vstack(tup): [4]]) """ - _warn_for_nonsequence(tup) return _nx.concatenate([atleast_2d(_m) for _m in tup], 0) @@ -331,7 +325,6 @@ def hstack(tup): [3, 4]]) """ - _warn_for_nonsequence(tup) arrs = [atleast_1d(_m) for _m in tup] # As a special case, dimension 0 of 1-dimensional arrays is "horizontal" if arrs and arrs[0].ndim == 1: @@ -406,7 +399,6 @@ def stack(arrays, axis=0, out=None): [3, 4]]) """ - _warn_for_nonsequence(arrays) arrays = [asanyarray(arr) for arr in arrays] if not arrays: raise ValueError('need at least one array to stack') |