diff options
author | Stephan Hoyer <shoyer@gmail.com> | 2016-01-15 13:25:43 -0800 |
---|---|---|
committer | Stephan Hoyer <shoyer@gmail.com> | 2016-01-15 13:25:43 -0800 |
commit | 54224f4e88036a8cd02c1306f2c1a5f655e41e3a (patch) | |
tree | b331b28110ddef0f897fa9b7c36ccd5433ac071a /numpy/lib/tests | |
parent | 4d87d909bab7a7dd4bb570444cf35d98d551668f (diff) | |
parent | 02bcbd7e99f7b73c2abcb2726f79ea01a6bba2da (diff) | |
download | numpy-54224f4e88036a8cd02c1306f2c1a5f655e41e3a.tar.gz |
Merge pull request #7000 from gfyoung/ndarray_arg_enforce
DOC, MAINT: Enforce np.ndarray arg for np.put and np.place
Diffstat (limited to 'numpy/lib/tests')
-rw-r--r-- | numpy/lib/tests/test_function_base.py | 4 | ||||
-rw-r--r-- | numpy/lib/tests/test_regression.py | 4 |
2 files changed, 4 insertions, 4 deletions
diff --git a/numpy/lib/tests/test_function_base.py b/numpy/lib/tests/test_function_base.py index a5ac78e33..88a590517 100644 --- a/numpy/lib/tests/test_function_base.py +++ b/numpy/lib/tests/test_function_base.py @@ -674,6 +674,10 @@ class TestExtins(TestCase): assert_array_equal(b, [3, 2, 2, 3, 3]) def test_place(self): + # Make sure that non-np.ndarray objects + # raise an error instead of doing nothing + assert_raises(TypeError, place, [1, 2, 3], [True, False], [0, 1]) + a = np.array([1, 4, 3, 2, 5, 8, 7]) place(a, [0, 1, 0, 1, 0, 1, 0], [2, 4, 6]) assert_array_equal(a, [1, 2, 3, 4, 5, 6, 7]) diff --git a/numpy/lib/tests/test_regression.py b/numpy/lib/tests/test_regression.py index 00fa3f195..ee50dcfa4 100644 --- a/numpy/lib/tests/test_regression.py +++ b/numpy/lib/tests/test_regression.py @@ -85,10 +85,6 @@ class TestRegression(TestCase): assert_(x != y) assert_(x == x) - def test_mem_insert(self, level=rlevel): - # Ticket #572 - np.lib.place(1, 1, 1) - def test_polyfit_build(self): # Ticket #628 ref = [-1.06123820e-06, 5.70886914e-04, -1.13822012e-01, |