Skip to content
This repository has been archived by the owner on Nov 17, 2023. It is now read-only.

Commit

Permalink
passing mat size as arg
Browse files Browse the repository at this point in the history
  • Loading branch information
Ubuntu committed Jul 23, 2020
1 parent 71a8778 commit 7dc2004
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions python/mxnet/test_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -298,9 +298,9 @@ def create_vector(size, dtype=np.int64):
return a

# For testing Large Square Matrix with total size > 2^32 elements
def get_large_identity_mat():
A = nd.zeros((LARGE_SQ_X, LARGE_SQ_X))
for i in range(LARGE_SQ_X):
def get_large_identity_mat(size):
A = nd.zeros((size, size))
for i in range(size):
A[i,i] = 1
return A

Expand Down
2 changes: 1 addition & 1 deletion tests/nightly/test_large_array.py
Original file line number Diff line number Diff line change
Expand Up @@ -1204,7 +1204,7 @@ def run_trsm(inp):
out = trsm(inp, inp)
return inp.grad, out

A = get_large_identity_mat()
A = get_large_identity_mat(LARGE_SQ_X)

grad, out = run_det(A)
check_diag(grad, 0)
Expand Down

0 comments on commit 7dc2004

Please sign in to comment.