summaryrefslogtreecommitdiff
path: root/numpy/lib/tests/test_function_base.py
diff options
context:
space:
mode:
authorEric Wieser <wieser.eric@gmail.com>2019-05-02 22:36:12 -0700
committerGitHub <noreply@github.com>2019-05-02 22:36:12 -0700
commitf64ec0ca21466d3d461b88e232451c750982e9e6 (patch)
tree8274b398babaa0bed1208c70a1bf0dcbbcac2431 /numpy/lib/tests/test_function_base.py
parent4b6b29afc06a639975d08f2e95dc3e1c36486188 (diff)
parentd7de4ad70d6794b36e4789e4f6146a884113bd66 (diff)
downloadnumpy-f64ec0ca21466d3d461b88e232451c750982e9e6.tar.gz
Merge pull request #13298 from navneet-nmk/diff-error
ENH: Added clearer exception for np.diff on 0-dimensional ndarray
Diffstat (limited to 'numpy/lib/tests/test_function_base.py')
-rw-r--r--numpy/lib/tests/test_function_base.py3
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 6d32c365a..a5ae2eeed 100644
--- a/numpy/lib/tests/test_function_base.py
+++ b/numpy/lib/tests/test_function_base.py
@@ -696,6 +696,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]