From e5d2f5b72bb1d544f81137a358f1dce726770e3d Mon Sep 17 00:00:00 2001 From: Gregory Ashton <gregory.ashton@ligo.org> Date: Thu, 26 Jul 2018 10:38:52 +1000 Subject: [PATCH] Minor clean up of printed output --- tupak/core/sampler.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/tupak/core/sampler.py b/tupak/core/sampler.py index 3c21bacee..af21e3341 100644 --- a/tupak/core/sampler.py +++ b/tupak/core/sampler.py @@ -546,6 +546,10 @@ class Dynesty(Sampler): else: out = self._run_external_sampler_without_checkpointing(nested_sampler) + # Flushes the output to force a line break + if self.kwargs["verbose"]: + print("") + # self.result.sampler_output = out weights = np.exp(out['logwt'] - out['logz'][-1]) self.result.samples = dynesty.utils.resample_equal( @@ -565,7 +569,6 @@ class Dynesty(Sampler): dlogz=self.kwargs['dlogz'], print_progress=self.kwargs['verbose'], print_func=self._print_func) - print("") return nested_sampler.results def _run_external_sampler_with_checkpointing(self, nested_sampler): @@ -596,8 +599,6 @@ class Dynesty(Sampler): dlogz=self.kwargs['dlogz'], print_progress=self.kwargs['verbose'], print_func=self._print_func, add_live=True) - - print("") self._remove_checkpoint() return nested_sampler.results -- GitLab