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

Method changeComponent

linear-algebra-python/src/lib.py:162–170  ·  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

160 return Vector(components)
161
162 def changeComponent(self, pos, value):
163 """
164 input: an index (pos) and a value
165 changes the specified component (pos) with the
166 'value'
167 """
168 # precondition
169 assert pos >= 0 and pos < len(self.__components)
170 self.__components[pos] = value
171
172 def norm(self):
173 """

Callers 3

test_changeComponentMethod · 0.95
randomVectorFunction · 0.45
__mul__Method · 0.45

Calls

no outgoing calls

Tested by 1

test_changeComponentMethod · 0.76