Commit 71019887 authored by Jameson Graef Rollins's avatar Jameson Graef Rollins

some fixes for python3 compatibility

parent c6a20e81
......@@ -166,7 +166,7 @@ class Struct(object):
"""
txt = io.StringIO()
for k, v in sorted(self.walk()):
if isinstance(v, (int, long, float, complex)):
if isinstance(v, (int, float, complex)):
base = fmt
elif isinstance(v, np.ndarray):
v = np.array2string(v, separator='', max_line_width=np.Inf, formatter={'all':lambda x: "{:0.6e} ".format(x)})
......
......@@ -63,7 +63,7 @@ def main():
freq = np.logspace(np.log10(FLO), np.log10(FHI), NPOINTS)
mdata_pkl = os.path.join(os.path.dirname(__file__), '{}.pkl'.format(args.IFO))
ifo_hash = hashlib.sha1(ifo.to_txt()).hexdigest()
ifo_hash = hashlib.sha1(ifo.to_txt().encode()).hexdigest()
gwinc_hash = path_hash(os.getenv('GWINCPATH'))
mrecalc = True
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment