diff options
author | Eric Wieser <wieser.eric@gmail.com> | 2017-03-26 10:38:28 +0100 |
---|---|---|
committer | Eric Wieser <wieser.eric@gmail.com> | 2017-03-28 20:44:42 +0100 |
commit | efa1bd2c0de6cd9c07b410002f2e1c0bae8cf385 (patch) | |
tree | 7506958775539df3cca2df402a4eebb9df65bb38 /numpy/lib/tests/test_function_base.py | |
parent | cd01f01e9238bf3d4d42613d804e06d35b94b48f (diff) | |
download | numpy-efa1bd2c0de6cd9c07b410002f2e1c0bae8cf385.tar.gz |
MAINT: Reuse _validate_axis in np.gradient
This also means that its axis argument invokes operator.index like
others do.
_validate_axis currently accepts lists of axes, which is a bug.
Diffstat (limited to 'numpy/lib/tests/test_function_base.py')
-rw-r--r-- | numpy/lib/tests/test_function_base.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/numpy/lib/tests/test_function_base.py b/numpy/lib/tests/test_function_base.py index 708b20482..6c6ed5941 100644 --- a/numpy/lib/tests/test_function_base.py +++ b/numpy/lib/tests/test_function_base.py @@ -902,9 +902,9 @@ class TestGradient(TestCase): # test maximal number of varargs assert_raises(TypeError, gradient, x, 1, 2, axis=1) - assert_raises(ValueError, gradient, x, axis=3) - assert_raises(ValueError, gradient, x, axis=-3) - assert_raises(TypeError, gradient, x, axis=[1,]) + assert_raises(np.AxisError, gradient, x, axis=3) + assert_raises(np.AxisError, gradient, x, axis=-3) + # assert_raises(TypeError, gradient, x, axis=[1,]) def test_timedelta64(self): # Make sure gradient() can handle special types like timedelta64 |