1
Fork 0

Add support for gunziped file to animate

This commit is contained in:
Edgar P. Burkhart 2022-04-14 15:03:56 +02:00
parent a9230f485f
commit 9e39cafb1d
Signed by: edpibu
GPG key ID: 9833D3C5A25BD227

View file

@ -27,7 +27,9 @@ config.read(args.config)
out = pathlib.Path(config.get("post", "out"))
out.mkdir(parents=True, exist_ok=True)
with gzip.open(out.joinpath("pickle.gz"), "rb") as f:
with gzip.open(gzf, "rb") if (
gzf := out.joinpath("pickle.gz")
).exists() else gzf.with_suffix("").open("rb") as f:
model = pickle.load(f)
x0 = config.getfloat("post", "x")