Skip to content

Commit

Permalink
Make a real list (not map object) in Python 3.
Browse files Browse the repository at this point in the history
  • Loading branch information
benmwebb committed Dec 18, 2015
1 parent 3726767 commit a652a4f
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions test/test_benchmark.py
Original file line number Diff line number Diff line change
Expand Up @@ -394,10 +394,10 @@ def cleanup_data(self, qvals, data, precision=5):
def chisquare(self, fla, flb, weighted=True, qmax=None, lognormal=False,
factor=(1, 1)):
# read first 3 columns
da = [map(float, i.split()[:3]) for i in open(fla).readlines() if not
i.startswith('#')]
db = [map(float, i.split()[:3]) for i in open(flb).readlines() if not
i.startswith('#')]
da = [[float(x) for x in i.split()[:3]]
for i in open(fla).readlines() if not i.startswith('#')]
db = [[float(x) for x in i.split()[:3]]
for i in open(flb).readlines() if not i.startswith('#')]
# get common q values up to 1e-5 in precision
qa = set(map(lambda a: int(a[0] * 10 ** 5), da))
qb = set(map(lambda a: int(a[0] * 10 ** 5), db))
Expand Down

0 comments on commit a652a4f

Please sign in to comment.