diff options
author | eskild <42120229+iameskild@users.noreply.github.com> | 2021-06-14 07:44:56 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-06-14 07:44:56 -0700 |
commit | 8dfe6758fc36d77e32f6d926acda8e37f6f41fde (patch) | |
tree | c39931bcb573f5b75868fc96de9eedde5f38d542 /numpy | |
parent | 9082ea18501442bc39d141fcfaeed8637e36115e (diff) | |
parent | 8ca435cff334671152bed11c817ec04ca5a702de (diff) | |
download | numpy-8dfe6758fc36d77e32f6d926acda8e37f6f41fde.tar.gz |
Merge pull request #1 from iameskild/fix_18951_test
Fix 18951 test
Diffstat (limited to 'numpy')
-rw-r--r-- | numpy/ma/tests/test_old_ma.py | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/numpy/ma/tests/test_old_ma.py b/numpy/ma/tests/test_old_ma.py index ab003b94e..7ac4c328f 100644 --- a/numpy/ma/tests/test_old_ma.py +++ b/numpy/ma/tests/test_old_ma.py @@ -697,6 +697,13 @@ class TestMa: assert_equal(b[0].shape, ()) assert_equal(b[1].shape, ()) + def test_assignment_by_condition(self): + # Test for gh-18951 + a = array([1, 2, 3, 4], mask=[1, 0, 1, 0]) + c = a>=3 + a[c] = 5 + assert_(a[2] is masked) + class TestUfuncs: def setup(self): |