summaryrefslogtreecommitdiff
path: root/numpy/lib/tests/test_function_base.py
diff options
context:
space:
mode:
authorJaime <jaime.frio@gmail.com>2016-03-15 16:42:48 +0100
committerJaime <jaime.frio@gmail.com>2016-03-15 16:42:48 +0100
commit1429c606643d1ad305e710c4a31cb6f398d04c53 (patch)
treeca3dc831ff1566a2794e940d1a358a17774fd59b /numpy/lib/tests/test_function_base.py
parente034b86d1f40af6e15a829d093232febd4a708c3 (diff)
parent9128ed5198cc8544406467a00824e5fe6791f090 (diff)
downloadnumpy-1429c606643d1ad305e710c4a31cb6f398d04c53.tar.gz
Merge pull request #7003 from gfyoung/place_str_fix
BUG: Fix string copying for np.place
Diffstat (limited to 'numpy/lib/tests/test_function_base.py')
-rw-r--r--numpy/lib/tests/test_function_base.py5
1 files changed, 5 insertions, 0 deletions
diff --git a/numpy/lib/tests/test_function_base.py b/numpy/lib/tests/test_function_base.py
index e04a497c1..945992fc0 100644
--- a/numpy/lib/tests/test_function_base.py
+++ b/numpy/lib/tests/test_function_base.py
@@ -805,6 +805,11 @@ class TestExtins(TestCase):
assert_raises_regex(ValueError, "Cannot insert from an empty array",
lambda: place(a, [0, 0, 0, 0, 0, 1, 0], []))
+ # See Issue #6974
+ a = np.array(['12', '34'])
+ place(a, [0, 1], '9')
+ assert_array_equal(a, ['12', '9'])
+
def test_both(self):
a = rand(10)
mask = a > 0.5