Code
Hub
Workspaces
Connect
Indexed graphs
Engine
MCP
copy
Index your code
hub
/
github.com/numpy/numpy
/ test_asmatrix
Method
test_asmatrix
numpy/matrixlib/tests/test_defmatrix.py:177–181 ·
view source on GitHub ↗
(self)
Source
from the content-addressed store, hash-verified
175
assert_(np.all(abs(mB > 0)))
176
177
def
test_asmatrix(self):
178
A = np.arange(100).reshape(10, 10)
179
mA = asmatrix(A)
180
A[0, 0] = -10
181
assert_(A[0, 0] == mA[0, 0])
182
183
def
test_noaxis(self):
184
A = matrix([[1, 0], [0, 1]])
Callers
nothing calls this directly
Calls
3
asmatrix
Function · 0.90
assert_
Function · 0.90
reshape
Method · 0.80
Tested by
no test coverage detected