diff options
author | Charles Harris <charlesr.harris@gmail.com> | 2016-05-11 09:37:16 -0600 |
---|---|---|
committer | Charles Harris <charlesr.harris@gmail.com> | 2016-05-11 09:37:16 -0600 |
commit | a7e9f4579fa14a3b72af6e723bcbe5549cd6f1c1 (patch) | |
tree | 4b3f9b7aa6b718590b6339de64f7621a956ed58a /numpy/lib/tests/test_function_base.py | |
parent | 49d1298cbaf41077f22b08cc2d9bf0e482d1e374 (diff) | |
parent | a9465db4c70f9cd9c3fb9010229aadc7ec5fdc9c (diff) | |
download | numpy-a7e9f4579fa14a3b72af6e723bcbe5549cd6f1c1.tar.gz |
Merge pull request #7618 from ahaldane/gradient_docstring
BUG: distance arg of np.gradient must be scalar, fix docstring
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 34dfd5ecc..044279294 100644 --- a/numpy/lib/tests/test_function_base.py +++ b/numpy/lib/tests/test_function_base.py @@ -666,6 +666,9 @@ class TestGradient(TestCase): assert_raises(SyntaxError, gradient, x, np.array([1., 1.]), np.array([1., 1.]), np.array([1., 1.])) + # disallow arrays as distances, see gh-6847 + assert_raises(ValueError, gradient, np.arange(5), np.ones(5)) + def test_masked(self): # Make sure that gradient supports subclasses like masked arrays x = np.ma.array([[1, 1], [3, 4]], |