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

Method changeComponent

linear-algebra-python/src/lib.py:297–304  ·  view source on GitHub ↗

changes the x-y component of this matrix

(self, x, y, value)

Source from the content-addressed store, hash-verified

295 return ans
296
297 def changeComponent(self, x, y, value):
298 """
299 changes the x-y component of this matrix
300 """
301 if x >= 0 and x < self.__height and y >= 0 and y < self.__width:
302 self.__matrix[x][y] = value
303 else:
304 raise Exception("changeComponent: indices out of bounds")
305
306 def component(self, x, y):
307 """

Callers 1

Calls

no outgoing calls

Tested by 1