MCPcopy Index your code
hub / github.com/subbarayudu-j/TheAlgorithms-Python / changeComponent

Method changeComponent

linear_algebra_python/src/lib.py:136–144  ·  view source on GitHub ↗

input: an index (pos) and a value changes the specified component (pos) with the 'value'

(self,pos,value)

Source from the content-addressed store, hash-verified

134 """
135 return Vector(self.__components)
136 def changeComponent(self,pos,value):
137 """
138 input: an index (pos) and a value
139 changes the specified component (pos) with the
140 'value'
141 """
142 #precondition
143 assert (-len(self.__components) <= pos < len(self.__components))
144 self.__components[pos] = value
145
146def zeroVector(dimension):
147 """

Callers 2

test_changeComponentMethod · 0.95
__mul__Method · 0.45

Calls

no outgoing calls

Tested by 1

test_changeComponentMethod · 0.76