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

Method test_compressed

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

Source from the content-addressed store, hash-verified

153 assert_equal(mXsmall.any(1), np.matrix([True, True, False]).T)
154
155 def test_compressed(self):
156 a = masked_array(np.matrix([1, 2, 3, 4]), mask=[0, 0, 0, 0])
157 b = a.compressed()
158 assert_equal(b, a)
159 assert_(isinstance(b, np.matrix))
160 a[0, 0] = masked
161 b = a.compressed()
162 assert_equal(b, [[2, 3, 4]])
163
164 def test_ravel(self):
165 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.85
compressedMethod · 0.45

Tested by

no test coverage detected