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

Method test_put_hardmask

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

Source from the content-addressed store, hash-verified

3617 assert_equal(x[3], 0)
3618
3619 def test_put_hardmask(self):
3620 # Tests put on hardmask
3621 d = arange(5)
3622 n = [0, 0, 0, 1, 1]
3623 m = make_mask(n)
3624 xh = array(d + 1, mask=m, hard_mask=True, copy=True)
3625 xh.put([4, 2, 0, 1, 3], [1, 2, 3, 4, 5])
3626 assert_equal(xh._data, [3, 4, 2, 4, 5])
3627
3628 def test_putmask(self):
3629 x = arange(6) + 1

Callers

nothing calls this directly

Calls 4

make_maskFunction · 0.90
arrayFunction · 0.90
assert_equalFunction · 0.90
putMethod · 0.80

Tested by

no test coverage detected