Skip to content

Commit

Permalink
Merge pull request #360 from alexbarcelo/patch-3
Browse files Browse the repository at this point in the history
Improper use of combinations_with_replacement
  • Loading branch information
compsuperscalar authored Nov 4, 2021
2 parents 69cc801 + 3c562f2 commit c2ebf61
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions dislib/math/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -171,13 +171,11 @@ def svd(a, compute_uv=True, sort=True, copy=True, eps=1e-9):
while not _check_convergence_svd(checks):
checks = []

pairings = itertools.combinations_with_replacement(
pairings = itertools.combinations(
range(x._n_blocks[1]), 2
)

for i, j in pairings:
if i >= j:
continue
coli_x = x._get_col_block(i)
colj_x = x._get_col_block(j)

Expand Down

0 comments on commit c2ebf61

Please sign in to comment.