diff options
author | ayir <navneet.nmk@gmail.com> | 2019-04-10 17:00:25 +0200 |
---|---|---|
committer | mattip <matti.picus@gmail.com> | 2019-04-26 09:05:23 -0700 |
commit | d7de4ad70d6794b36e4789e4f6146a884113bd66 (patch) | |
tree | 5faaa6463ebdb099eeca171fcf2312e69fd0e807 /numpy/lib/tests/test_function_base.py | |
parent | 412975de43e6c5e4b6f1051f3a04968c629240c7 (diff) | |
download | numpy-d7de4ad70d6794b36e4789e4f6146a884113bd66.tar.gz |
ENH: add clearer error message for diff(0-d)
Diffstat (limited to 'numpy/lib/tests/test_function_base.py')
-rw-r--r-- | numpy/lib/tests/test_function_base.py | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/numpy/lib/tests/test_function_base.py b/numpy/lib/tests/test_function_base.py index 1e04bfaec..8f1b56e3f 100644 --- a/numpy/lib/tests/test_function_base.py +++ b/numpy/lib/tests/test_function_base.py @@ -695,6 +695,9 @@ class TestDiff(object): assert_raises(np.AxisError, diff, x, axis=3) assert_raises(np.AxisError, diff, x, axis=-4) + x = np.array(1.11111111111, np.float64) + assert_raises(ValueError, diff, x) + def test_nd(self): x = 20 * rand(10, 20, 30) out1 = x[:, :, 1:] - x[:, :, :-1] |