Skip to content
Snippets Groups Projects
Commit a213d255 authored by Bas Nijholt's avatar Bas Nijholt
Browse files

call np.linalg.lstsq with rcond=-1 to suppress the FutureWarning in numpy 1.14

Closes #182
parent 90d9b886
No related branches found
No related tags found
No related merge requests found
......@@ -100,7 +100,8 @@ def lll(basis, c=1.34):
if abs(u[i+1, i]) > 0.5:
ll_reduce(i+1)
i = max(i-1, 0)
coefs = np.linalg.lstsq(vecs_orig.T, vecs.T)[0]
# TODO: change to rcond=None once we depend on numpy >= 1.14.
coefs = np.linalg.lstsq(vecs_orig.T, vecs.T, rcond=-1)[0]
if not np.allclose(np.round(coefs), coefs, atol=1e-6):
raise RuntimeError('LLL algorithm instability.')
if not is_c_reduced(vecs, c):
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment