diff --git a/estimator/lwe_dual.py b/estimator/lwe_dual.py index e44cf16..04bb705 100644 --- a/estimator/lwe_dual.py +++ b/estimator/lwe_dual.py @@ -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 @@ -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) diff --git a/estimator/nd.py b/estimator/nd.py index 39700ac..77bf645 100644 --- a/estimator/nd.py +++ b/estimator/nd.py @@ -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)