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

Method test_matrix

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

Source from the content-addressed store, hash-verified

228 assert_raises(np.ma.MAError, lambda: mr_['1, 2; 3, 4'])
229
230 def test_matrix(self):
231 # Test consistency with unmasked version. If we ever deprecate
232 # matrix, this test should either still pass, or both actual and
233 # expected should fail to be build.
234 actual = mr_['r', 1, 2, 3]
235 expected = np.ma.array(np.r_['r', 1, 2, 3])
236 assert_array_equal(actual, expected)
237
238 # outer type is masked array, inner type is matrix
239 assert_equal(type(actual), type(expected))
240 assert_equal(type(actual.data), type(expected.data))

Callers

nothing calls this directly

Calls 2

assert_array_equalFunction · 0.90
assert_equalFunction · 0.90

Tested by

no test coverage detected