Skip to content

Commit

Permalink
pylint
Browse files Browse the repository at this point in the history
  • Loading branch information
renatomello committed Oct 16, 2024
1 parent 8049499 commit f768db7
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions tests/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,9 @@ def random_sparse_matrix(backend, n, sparse_type=None):
indices = np.random.randint(0, n, size=(nonzero, 2))
data = np.random.random(nonzero) + 1j * np.random.random(nonzero)
data = backend.cast(data)

return backend.tf.sparse.SparseTensor(indices, data, (n, n))
else:
re = sparse.rand(n, n, format=sparse_type)
im = sparse.rand(n, n, format=sparse_type)
return re + 1j * im

re = sparse.rand(n, n, format=sparse_type)
im = sparse.rand(n, n, format=sparse_type)
return re + 1j * im

0 comments on commit f768db7

Please sign in to comment.