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

Function zeroVector

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

returns a zero-vector of size 'dimension'

(dimension)

Source from the content-addressed store, hash-verified

196
197
198def zeroVector(dimension):
199 """
200 returns a zero-vector of size 'dimension'
201 """
202 # precondition
203 assert isinstance(dimension, int)
204 ans = []
205 for i in range(dimension):
206 ans.append(0)
207 return Vector(ans)
208
209
210def unitBasisVector(dimension, pos):

Callers 3

test_zeroVectorMethod · 0.85
randomVectorFunction · 0.85
__mul__Method · 0.85

Calls 2

VectorClass · 0.85
appendMethod · 0.45

Tested by 1

test_zeroVectorMethod · 0.68