MCPcopy Create free account
hub / github.com/TheAlgorithms/Python / change_component

Method change_component

linear_algebra/src/lib.py:374–381  ·  view source on GitHub ↗

changes the x-y component of this matrix

(self, x: int, y: int, value: float)

Source from the content-addressed store, hash-verified

372 raise Exception("change_component: indices out of bounds")
373
374 def change_component(self, x: int, y: int, value: float) -> None:
375 """
376 changes the x-y component of this matrix
377 """
378 if 0 <= x < self.__height and 0 <= y < self.__width:
379 self.__matrix[x][y] = value
380 else:
381 raise Exception("change_component: indices out of bounds")
382
383 def minor(self, x: int, y: int) -> float:
384 """

Callers 1

Calls

no outgoing calls

Tested by 1