MCPcopy Index your code
hub / github.com/TheAlgorithms/Python / test__sub__matrix

Method test__sub__matrix

linear_algebra/src/test_linear_algebra.py:194–200  ·  view source on GitHub ↗

test for Matrix - operator

(self)

Source from the content-addressed store, hash-verified

192 assert str(a + b) == "|2,4,10|\n|4,8,10|\n|12,14,18|\n"
193
194 def test__sub__matrix(self) -> None:
195 """
196 test for Matrix - operator
197 """
198 a = Matrix([[1, 2, 3], [2, 4, 5], [6, 7, 8]], 3, 3)
199 b = Matrix([[1, 2, 7], [2, 4, 5], [6, 7, 10]], 3, 3)
200 assert str(a - b) == "|0,0,-4|\n|0,0,0|\n|0,0,-2|\n"
201
202 def test_square_zero_matrix(self) -> None:
203 """

Callers

nothing calls this directly

Calls 1

MatrixClass · 0.70

Tested by

no test coverage detected