Skip to content

Commit

Permalink
Python 3 ready
Browse files Browse the repository at this point in the history
  • Loading branch information
malb committed Apr 28, 2018
1 parent ddf37d2 commit ef9afb2
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/fpylll/tools/bkz_simulator.py
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ def simulate(r, param):
d = len(r)

# code uses log2 of norms, FPLLL uses squared norms
r = map(lambda x: log(x, 2)/2., r)
r = list(map(lambda x: log(x, 2)/2., r))

r1 = copy(r)
r2 = copy(r)
Expand Down Expand Up @@ -121,9 +121,9 @@ def simulate(r, param):
if param.flags & BKZ.VERBOSE:
r = OrderedDict()
r["i"] = i
for k, v in basis_quality(map(lambda x: 2.**(2*x), r1)).iteritems():
for k, v in basis_quality(list(map(lambda x: 2.**(2*x), r1))).items():
r[k] = v
print(pretty_dict(r))

r1 = map(lambda x: 2.**(2*x), r1)
r1 = list(map(lambda x: 2.**(2*x), r1))
return r1, i+1

0 comments on commit ef9afb2

Please sign in to comment.