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

Method test_compressed

numpy/matrixlib/tests/test_masked_matrix.py:146–153  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

144 assert_equal(mXsmall.any(1), np.matrix([True, True, False]).T)
145
146 def test_compressed(self):
147 a = masked_array(np.matrix([1, 2, 3, 4]), mask=[0, 0, 0, 0])
148 b = a.compressed()
149 assert_equal(b, a)
150 assert_(isinstance(b, np.matrix))
151 a[0, 0] = masked
152 b = a.compressed()
153 assert_equal(b, [[2, 3, 4]])
154
155 def test_ravel(self):
156 a = masked_array(np.matrix([1, 2, 3, 4, 5]), mask=[[0, 1, 0, 0, 0]])

Callers

nothing calls this directly

Calls 3

assert_equalFunction · 0.90
assert_Function · 0.50
compressedMethod · 0.45

Tested by

no test coverage detected