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

Method test_component_matrix

linear_algebra/src/test_linear_algebra.py:179–184  ·  view source on GitHub ↗

test for Matrix method component()

(self)

Source from the content-addressed store, hash-verified

177 assert str(a) == "|1,2,5|\n|2,4,5|\n|6,7,8|\n"
178
179 def test_component_matrix(self) -> None:
180 """
181 test for Matrix method component()
182 """
183 a = Matrix([[1, 2, 3], [2, 4, 5], [6, 7, 8]], 3, 3)
184 assert a.component(2, 1) == 7, "0.01"
185
186 def test__add__matrix(self) -> None:
187 """

Callers

nothing calls this directly

Calls 2

componentMethod · 0.95
MatrixClass · 0.70

Tested by

no test coverage detected