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

Method test_asmatrix

numpy/matrixlib/tests/test_defmatrix.py:172–176  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

170 assert_(np.all(abs(mB > 0)))
171
172 def test_asmatrix(self):
173 A = np.arange(100).reshape(10, 10)
174 mA = asmatrix(A)
175 A[0, 0] = -10
176 assert_(A[0, 0] == mA[0, 0])
177
178 def test_noaxis(self):
179 A = matrix([[1, 0], [0, 1]])

Callers

nothing calls this directly

Calls 3

asmatrixFunction · 0.90
assert_Function · 0.90
reshapeMethod · 0.80

Tested by

no test coverage detected