MCPcopy Create free account
hub / github.com/subbarayudu-j/TheAlgorithms-Python / component

Method component

linear_algebra_python/src/lib.py:238–245  ·  view source on GitHub ↗

returns the specified (x,y) component

(self,x,y)

Source from the content-addressed store, hash-verified

236 else:
237 raise Exception ("changeComponent: indices out of bounds")
238 def component(self,x,y):
239 """
240 returns the specified (x,y) component
241 """
242 if x >= 0 and x < self.__height and y >= 0 and y < self.__width:
243 return self.__matrix[x][y]
244 else:
245 raise Exception ("changeComponent: indices out of bounds")
246 def width(self):
247 """
248 getter for the width

Callers 1

test_component_matrixMethod · 0.95

Calls

no outgoing calls

Tested by 1

test_component_matrixMethod · 0.76