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

Function test_identity

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

Source from the content-addressed store, hash-verified

23 assert_array_equal(numpy.matlib.zeros(2), np.matrix([[0., 0.]]))
24
25def test_identity():
26 x = numpy.matlib.identity(2, dtype=int)
27 assert_array_equal(x, np.matrix([[1, 0], [0, 1]]))
28
29def test_eye():
30 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

Used in the wild real call sites across dependent graphs

searching dependent graphs…