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/testing/tests/test_utils.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'numpy/testing/tests/test_utils.py') diff --git a/numpy/testing/tests/test_utils.py b/numpy/testing/tests/test_utils.py index c376a3852..9081f3d6e 100644 --- a/numpy/testing/tests/test_utils.py +++ b/numpy/testing/tests/test_utils.py @@ -186,9 +186,8 @@ class TestArrayEqual(_GenericTest): a = np.array([1., 2.]).view(MyArray) b = np.array([2., 3.]).view(MyArray) - if np.core.overrides.ENABLE_ARRAY_FUNCTION: - with assert_raises(TypeError): - np.all(a) + with assert_raises(TypeError): + np.all(a) self._test_equal(a, a) self._test_not_equal(a, b) self._test_not_equal(b, a) -- cgit v1.2.1