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

Function test_identity

numpy/tests/test_matlib.py:24–26  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

22 assert_array_equal(numpy.matlib.zeros(2), np.matrix([[ 0., 0.]]))
23
24def test_identity():
25 x = numpy.matlib.identity(2, dtype=int)
26 assert_array_equal(x, np.matrix([[1, 0], [0, 1]]))
27
28def test_eye():
29 xc = numpy.matlib.eye(3, k=1, dtype=int)

Callers

nothing calls this directly

Calls 2

assert_array_equalFunction · 0.90
identityMethod · 0.80

Tested by

no test coverage detected