From 96d179ce5bd0e3f75508f6afdfb2fb65170cc83c Mon Sep 17 00:00:00 2001 From: Stephan Hoyer Date: Tue, 22 Jan 2019 14:07:47 -0800 Subject: 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__``). --- numpy/lib/shape_base.py | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) (limited to 'numpy/lib/shape_base.py') diff --git a/numpy/lib/shape_base.py b/numpy/lib/shape_base.py index e088a6c4a..ac2a25604 100644 --- a/numpy/lib/shape_base.py +++ b/numpy/lib/shape_base.py @@ -11,8 +11,7 @@ from numpy.core.fromnumeric import product, reshape, transpose from numpy.core.multiarray import normalize_axis_index from numpy.core import overrides from numpy.core import vstack, atleast_3d -from numpy.core.shape_base import ( - _arrays_for_stack_dispatcher, _warn_for_nonsequence) +from numpy.core.shape_base import _arrays_for_stack_dispatcher from numpy.lib.index_tricks import ndindex from numpy.matrixlib.defmatrix import matrix # this raises all the right alarm bells @@ -630,7 +629,6 @@ def column_stack(tup): [3, 4]]) """ - _warn_for_nonsequence(tup) arrays = [] for v in tup: arr = array(v, copy=False, subok=True) @@ -695,7 +693,6 @@ def dstack(tup): [[3, 4]]]) """ - _warn_for_nonsequence(tup) return _nx.concatenate([atleast_3d(_m) for _m in tup], 2) -- cgit v1.2.1