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

Method test_put_hardmask

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

Source from the content-addressed store, hash-verified

3403 assert_equal(x[3], 0)
3404
3405 def test_put_hardmask(self):
3406 # Tests put on hardmask
3407 d = arange(5)
3408 n = [0, 0, 0, 1, 1]
3409 m = make_mask(n)
3410 xh = array(d + 1, mask=m, hard_mask=True, copy=True)
3411 xh.put([4, 2, 0, 1, 3], [1, 2, 3, 4, 5])
3412 assert_equal(xh._data, [3, 4, 2, 4, 5])
3413
3414 def test_putmask(self):
3415 x = arange(6) + 1

Callers

nothing calls this directly

Calls 5

make_maskFunction · 0.90
arrayFunction · 0.90
assert_equalFunction · 0.90
arangeFunction · 0.85
putMethod · 0.80

Tested by

no test coverage detected