diff --git a/gwinc/struct.py b/gwinc/struct.py index 2bc7ba20f3300617b0f2de0d1d2413ca96040716..f9bcaef3e923ac5059abf3c368adab0f32007e2c 100644 --- a/gwinc/struct.py +++ b/gwinc/struct.py @@ -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)}) diff --git a/gwinc/test/__main__.py b/gwinc/test/__main__.py index adf700b6f5e806cfa4a34685c0f4b73a45be92ba..17f87626a01c3b56a487f85ebdf76505a9755806 100644 --- a/gwinc/test/__main__.py +++ b/gwinc/test/__main__.py @@ -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