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

Method test_axpy

linear_algebra/src/test_linear_algebra.py:103–109  ·  view source on GitHub ↗

test for global function axpy() (operation)

(self)

Source from the content-addressed store, hash-verified

101 assert str(unit_basis_vector(3, 1)) == "(0,1,0)"
102
103 def test_axpy(self) -> None:
104 """
105 test for global function axpy() (operation)
106 """
107 x = Vector([1, 2, 3])
108 y = Vector([1, 0, 1])
109 assert str(axpy(2, x, y)) == "(3,4,7)"
110
111 def test_copy(self) -> None:
112 """

Callers

nothing calls this directly

Calls 2

VectorClass · 0.85
axpyFunction · 0.85

Tested by

no test coverage detected