Commit d0c70f28 authored by Médéric Boquien's avatar Médéric Boquien

When stripping the _log suffix of a variable names, let's just remove the last...

When stripping the _log suffix of a variable names, let's just remove the last four characters instead of relying on strip(), which can have nasty side effects.
parent c76b486e
...@@ -256,7 +256,7 @@ def analysis(idx, obs): ...@@ -256,7 +256,7 @@ def analysis(idx, obs):
# likelihood as weight. # likelihood as weight.
for i, variable in enumerate(gbl_analysed_variables): for i, variable in enumerate(gbl_analysed_variables):
if variable.endswith('_log'): if variable.endswith('_log'):
variable = variable.strip('_log') variable = variable[:-4]
_ = np.log10 _ = np.log10
maxstd = lambda mean, std: max(0.02, std) maxstd = lambda mean, std: max(0.02, std)
else: else:
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment