MCPcopy Index your code
hub / github.com/geekcomputers/Python / test__add__matrix

Method test__add__matrix

linear-algebra-python/src/tests.py:138–141  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

136 self.assertEqual(7, A.component(2, 1), 0.01)
137
138 def test__add__matrix(self):
139 A = Matrix([[1, 2, 3], [2, 4, 5], [6, 7, 8]], 3, 3)
140 B = Matrix([[1, 2, 7], [2, 4, 5], [6, 7, 10]], 3, 3)
141 self.assertEqual("|2,4,10|\n|4,8,10|\n|12,14,18|\n", (A + B).__str__())
142
143 def test__sub__matrix(self):
144 A = Matrix([[1, 2, 3], [2, 4, 5], [6, 7, 8]], 3, 3)

Callers

nothing calls this directly

Calls 2

MatrixClass · 0.85
__str__Method · 0.45

Tested by

no test coverage detected