From 8cc369853e9ab8788651056b7fbeab7ebc50a01c Mon Sep 17 00:00:00 2001 From: Moritz Huebner <email@moritz-huebner.de> Date: Mon, 26 Apr 2021 13:51:24 +1000 Subject: [PATCH] Made implementation generic to pickle and pkl --- bilby/core/result.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/bilby/core/result.py b/bilby/core/result.py index fc709c512..f81558c2a 100644 --- a/bilby/core/result.py +++ b/bilby/core/result.py @@ -43,6 +43,8 @@ def result_file_name(outdir, label, extension='json', gzip=False): ======= str: File name of the output file """ + if extension == 'pickle': + extension = 'pkl' if extension in ['json', 'hdf5', 'pkl']: if extension == 'json' and gzip: return os.path.join(outdir, '{}_result.{}.gz'.format(label, extension)) @@ -735,7 +737,7 @@ class Result(object): default=False outdir: str, optional Path to the outdir. Default is the one stored in the result object. - extension: str, optional {json, hdf5, pickle, True} + extension: str, optional {json, hdf5, pkl, pickle, True} Determines the method to use to store the data (if True defaults to json) gzip: bool, optional -- GitLab