MCPcopy Create free account
hub / github.com/numpy/numpy / test_put_nomask

Method test_put_nomask

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

Source from the content-addressed store, hash-verified

3389 assert_equal(x.mask, [1, 0, 0, 0, 1, 1, 0, 0, 0, 0])
3390
3391 def test_put_nomask(self):
3392 # GitHub issue 6425
3393 x = zeros(10)
3394 z = array([3., -1.], mask=[False, True])
3395
3396 x.put([1, 2], z)
3397 assert_(x[0] is not masked)
3398 assert_equal(x[0], 0)
3399 assert_(x[1] is not masked)
3400 assert_equal(x[1], 3)
3401 assert_(x[2] is masked)
3402 assert_(x[3] is not masked)
3403 assert_equal(x[3], 0)
3404
3405 def test_put_hardmask(self):
3406 # Tests put on hardmask

Callers

nothing calls this directly

Calls 5

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

Tested by

no test coverage detected