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

Method test_2d

numpy/lib/tests/test_twodim_base.py:60–70  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

58 [0, 0, 1, 0]]))
59
60 def test_2d(self):
61 assert_equal(eye(4, 3),
62 array([[1, 0, 0],
63 [0, 1, 0],
64 [0, 0, 1],
65 [0, 0, 0]]))
66
67 assert_equal(eye(3, 4),
68 array([[1, 0, 0, 0],
69 [0, 1, 0, 0],
70 [0, 0, 1, 0]]))
71
72 def test_diag2d(self):
73 assert_equal(eye(3, 4, k=2),

Callers

nothing calls this directly

Calls 3

assert_equalFunction · 0.90
eyeFunction · 0.90
arrayFunction · 0.90

Tested by

no test coverage detected