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

Function squareZeroMatrix

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

returns a square zero-matrix of dimension NxN

(N)

Source from the content-addressed store, hash-verified

400
401
402def squareZeroMatrix(N):
403 """
404 returns a square zero-matrix of dimension NxN
405 """
406 ans = []
407 for i in range(N):
408 row = []
409 for j in range(N):
410 row.append(0)
411 ans.append(row)
412 return Matrix(ans, N, N)
413
414
415def randomMatrix(W, H, a, b):

Callers 1

test_squareZeroMatrixMethod · 0.85

Calls 2

MatrixClass · 0.85
appendMethod · 0.45

Tested by 1

test_squareZeroMatrixMethod · 0.68