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

Method test_basic

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

Source from the content-addressed store, hash-verified

23
24class TestEye:
25 def test_basic(self):
26 assert_equal(eye(4),
27 array([[1, 0, 0, 0],
28 [0, 1, 0, 0],
29 [0, 0, 1, 0],
30 [0, 0, 0, 1]]))
31
32 assert_equal(eye(4, dtype='f'),
33 array([[1, 0, 0, 0],
34 [0, 1, 0, 0],
35 [0, 0, 1, 0],
36 [0, 0, 0, 1]], 'f'))
37
38 assert_equal(eye(3) == 1,
39 eye(3, dtype=bool))
40
41 def test_uint64(self):
42 # Regression test for gh-9982

Callers

nothing calls this directly

Calls 3

assert_equalFunction · 0.90
eyeFunction · 0.90
arrayFunction · 0.90

Tested by

no test coverage detected