Commit 956cd54c authored by Gregory Ashton's avatar Gregory Ashton

Adds a simple hack to ensure corner doesn't fail

If the prior is fixed at a constant, but you include the parameter name
in the parameters given to plot_corner. It currently fails with a
confusing message about the range. This just sets the range which means
a plot will be created.
parent 5566d9d0
Pipeline #42717 passed with stage
in 9 minutes and 43 seconds
......@@ -677,6 +677,10 @@ class Result(object):
'labels', self.get_latex_labels_from_parameter_keys(
# Unless already set, set the range to include all samples
# This prevents ValueErrors being raised for parameters with no range
kwargs['range'] = kwargs.get('range', [1] * len(plot_parameter_keys))
# Create the data array to plot and pass everything to corner
xs = self.posterior[plot_parameter_keys].values
fig = corner.corner(xs, **kwargs)
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