diff --git a/test/test_benchmark.py b/test/test_benchmark.py index 3e9f7f2..e3335c7 100755 --- a/test/test_benchmark.py +++ b/test/test_benchmark.py @@ -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))