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

Method test_hardmask_again

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

Source from the content-addressed store, hash-verified

1994 assert_equal(xh._mask, [[1, 0], [0, 0]])
1995
1996 def test_hardmask_again(self):
1997 # Another test of hardmask
1998 d = arange(5)
1999 n = [0, 0, 0, 1, 1]
2000 m = make_mask(n)
2001 xh = array(d, mask=m, hard_mask=True)
2002 xh[4:5] = 999
2003 xh[0:1] = 999
2004 assert_equal(xh._data, [999, 1, 2, 3, 4])
2005
2006 def test_hardmask_oncemore_yay(self):
2007 # OK, yet another test of hardmask

Callers

nothing calls this directly

Calls 4

make_maskFunction · 0.90
arrayFunction · 0.90
assert_equalFunction · 0.90
arangeFunction · 0.85

Tested by

no test coverage detected