Skip to content

Commit

Permalink
Eradicate replace & fix CI
Browse files Browse the repository at this point in the history
  • Loading branch information
ludopulles committed Sep 19, 2024
1 parent cca27c0 commit cc0d5e0
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
3 changes: 1 addition & 2 deletions estimator/lwe_dual.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
"""

from functools import partial
from dataclasses import replace

from sage.all import oo, ceil, sqrt, log, cached_function, RR, exp, pi, e, coth, tanh

Expand Down Expand Up @@ -69,7 +68,7 @@ def dual_reduce(
if h1 == h:
# no reason to do lattice reduction if we assume
# that the hw on the reduction part is 0
return replace(params, Xs=slv_Xs, m=oo), 1
return params.updated(Xs=slv_Xs, m=oo), 1
else:
# distribution is i.i.d. for each coordinate
red_Xs = params.Xs.resize(params.n - zeta)
Expand Down
2 changes: 1 addition & 1 deletion estimator/nd.py
Original file line number Diff line number Diff line change
Expand Up @@ -240,7 +240,7 @@ def support_size(self, fraction=1.0):
>>> from estimator import *
>>> ND.DiscreteGaussian(1.0, n=128).support_size(0.99)
2.686...e+174
2.68643790357272e174
"""
# We will treat this noise distribution as bounded with failure probability `1 - fraction`.
n = len(self)
Expand Down

0 comments on commit cc0d5e0

Please sign in to comment.