(self)
| 45 | array([[0, 1, 0, 0], [0, 0, 1, 0]])) |
| 46 | |
| 47 | def test_diag(self): |
| 48 | assert_equal(eye(4, k=1), |
| 49 | array([[0, 1, 0, 0], |
| 50 | [0, 0, 1, 0], |
| 51 | [0, 0, 0, 1], |
| 52 | [0, 0, 0, 0]])) |
| 53 | |
| 54 | assert_equal(eye(4, k=-1), |
| 55 | array([[0, 0, 0, 0], |
| 56 | [1, 0, 0, 0], |
| 57 | [0, 1, 0, 0], |
| 58 | [0, 0, 1, 0]])) |
| 59 | |
| 60 | def test_2d(self): |
| 61 | assert_equal(eye(4, 3), |
nothing calls this directly
no test coverage detected