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

Method test__mul__matrix

linear_algebra/src/test_linear_algebra.py:162–169  ·  view source on GitHub ↗

test for Matrix * operator

(self)

Source from the content-addressed store, hash-verified

160 assert a.determinant() == -5
161
162 def test__mul__matrix(self) -> None:
163 """
164 test for Matrix * operator
165 """
166 a = Matrix([[1, 2, 3], [4, 5, 6], [7, 8, 9]], 3, 3)
167 x = Vector([1, 2, 3])
168 assert str(a * x) == "(14,32,50)"
169 assert str(a * 2) == "|2,4,6|\n|8,10,12|\n|14,16,18|\n"
170
171 def test_change_component_matrix(self) -> None:
172 """

Callers

nothing calls this directly

Calls 2

VectorClass · 0.85
MatrixClass · 0.70

Tested by

no test coverage detected