test for Matrix method cofactor()
(self)
| 143 | assert minors[x][y] == a.minor(x, y) |
| 144 | |
| 145 | def test_cofactor(self) -> None: |
| 146 | """ |
| 147 | test for Matrix method cofactor() |
| 148 | """ |
| 149 | a = Matrix([[1, 2, 3], [2, 4, 5], [6, 7, 8]], 3, 3) |
| 150 | cofactors = [[-3, 14, -10], [5, -10, 5], [-2, 1, 0]] |
| 151 | for x in range(a.height()): |
| 152 | for y in range(a.width()): |
| 153 | assert cofactors[x][y] == a.cofactor(x, y) |
| 154 | |
| 155 | def test_determinant(self) -> None: |
| 156 | """ |