From e3ed705e5d91b584e9191a20f3a4780d354271ff Mon Sep 17 00:00:00 2001 From: Eric Wieser Date: Sun, 26 Mar 2017 11:22:43 +0100 Subject: MAINT: Use _validate_axis inside _ureduce This fixes an omission where duplicate axes would only be detected when positive --- numpy/ma/tests/test_extras.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'numpy/ma') diff --git a/numpy/ma/tests/test_extras.py b/numpy/ma/tests/test_extras.py index 547a3fb81..77a5c0fc6 100644 --- a/numpy/ma/tests/test_extras.py +++ b/numpy/ma/tests/test_extras.py @@ -732,7 +732,7 @@ class TestMedian(TestCase): for axis, over in args: try: np.ma.median(x, axis=axis, overwrite_input=over) - except IndexError: + except np.AxisError: pass else: raise AssertionError(msg % (mask, ndmin, axis, over)) -- cgit v1.2.1