Skip to content
Snippets Groups Projects
Commit aee04c79 authored by Gregory Ashton's avatar Gregory Ashton
Browse files

Merge branch '492-minimum-python-version-should-be-3-6' into 'master'

Revert f-strings to keep python 3.5 compatibility

Closes #492

See merge request !811
parents 4893cd83 3d21690f
No related branches found
No related tags found
1 merge request!811Revert f-strings to keep python 3.5 compatibility
Pipeline #136446 passed
...@@ -114,7 +114,7 @@ class Cpnest(NestedSampler): ...@@ -114,7 +114,7 @@ class Cpnest(NestedSampler):
out.run() out.run()
except SystemExit as e: except SystemExit as e:
import sys import sys
logger.info(f"Caught exit code {e.args[0]}, exiting with signal {self.exit_code}") logger.info("Caught exit code {}, exiting with signal {}".format(e.args[0], self.exit_code))
sys.exit(self.exit_code) sys.exit(self.exit_code)
if self.plot: if self.plot:
......
...@@ -631,7 +631,7 @@ class Dynesty(NestedSampler): ...@@ -631,7 +631,7 @@ class Dynesty(NestedSampler):
filename = "{}/{}_checkpoint_stats.png".format(self.outdir, self.label) filename = "{}/{}_checkpoint_stats.png".format(self.outdir, self.label)
fig, axs = plt.subplots(nrows=3, sharex=True) fig, axs = plt.subplots(nrows=3, sharex=True)
for ax, name in zip(axs, ["boundidx", "nc", "scale"]): for ax, name in zip(axs, ["boundidx", "nc", "scale"]):
ax.plot(getattr(self.sampler, f"saved_{name}"), color="C0") ax.plot(getattr(self.sampler, "saved_{}".format(name)), color="C0")
ax.set_ylabel(name) ax.set_ylabel(name)
axs[-1].set_xlabel("iteration") axs[-1].set_xlabel("iteration")
fig.tight_layout() fig.tight_layout()
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment