MCPcopy Index your code
hub / github.com/numpy/numpy / test_put_nomask

Method test_put_nomask

numpy/ma/tests/test_core.py:3605–3617  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

3603 assert_equal(x.mask, [1, 0, 0, 0, 1, 1, 0, 0, 0, 0])
3604
3605 def test_put_nomask(self):
3606 # GitHub issue 6425
3607 x = zeros(10)
3608 z = array([3., -1.], mask=[False, True])
3609
3610 x.put([1, 2], z)
3611 assert_(x[0] is not masked)
3612 assert_equal(x[0], 0)
3613 assert_(x[1] is not masked)
3614 assert_equal(x[1], 3)
3615 assert_(x[2] is masked)
3616 assert_(x[3] is not masked)
3617 assert_equal(x[3], 0)
3618
3619 def test_put_hardmask(self):
3620 # Tests put on hardmask

Callers

nothing calls this directly

Calls 5

arrayFunction · 0.90
assert_equalFunction · 0.90
zerosFunction · 0.85
assert_Function · 0.85
putMethod · 0.80

Tested by

no test coverage detected