From 2f326d1ce63fed23b3ff459b60ee0df54799f976 Mon Sep 17 00:00:00 2001 From: Johannes Buchner Date: Tue, 8 Dec 2020 01:01:28 +0100 Subject: [PATCH] windows compat: avoid a lingering open file --- ultranest/integrator.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/ultranest/integrator.py b/ultranest/integrator.py index d5a5d5ae..afaa19f7 100644 --- a/ultranest/integrator.py +++ b/ultranest/integrator.py @@ -2742,6 +2742,8 @@ def read_file(log_dir, x_dim, num_bootstraps=20, random=True, verbose=False, che num_params = ncols - 3 - x_dim points = fileobj['points'][:] + fileobj.close() + del fileobj stack = list(enumerate(points)) pointpile = PointPile(x_dim, num_params)