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

Method test_hardmask_again

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

Source from the content-addressed store, hash-verified

2161 assert_equal(xh._mask, [[1, 0], [0, 0]])
2162
2163 def test_hardmask_again(self):
2164 # Another test of hardmask
2165 d = arange(5)
2166 n = [0, 0, 0, 1, 1]
2167 m = make_mask(n)
2168 xh = array(d, mask=m, hard_mask=True)
2169 xh[4:5] = 999
2170 xh[0:1] = 999
2171 assert_equal(xh._data, [999, 1, 2, 3, 4])
2172
2173 def test_hardmask_oncemore_yay(self):
2174 # OK, yet another test of hardmask

Callers

nothing calls this directly

Calls 3

make_maskFunction · 0.90
arrayFunction · 0.90
assert_equalFunction · 0.90

Tested by

no test coverage detected