Description
Hi,
The behaviour of the title_quantiles
argument that was introduced in v2.2.2 is responsible for a crash when using the following set of arguments:
show_titles=True
, title_quantiles=None
and a list for quantiles
that has a number of elements other than 3. In this case, according to what is written in the documentation, the value for title_quantiles
is set as what is passed for quantiles
, and a ValueError
is raised.
In particular, this is an issue for compatibility with codes that were running with corner
versions older than v2.2.2.
The error can be reproduced by slightly modifying the code from the Getting started tutorial (https://corner.readthedocs.io/en/latest/pages/quickstart/):
import corner
import numpy as np
ndim, nsamples = 2, 10000
np.random.seed(42)
samples = np.random.randn(ndim * nsamples).reshape([nsamples, ndim])
figure = corner.corner(samples, quantiles=[0.16, 0.84],
show_titles=True, title_quantiles=None)
Running this code, the following error is raised:
ValueError: 'title_quantiles' must contain exactly three values; pass a length-3 list or array using the 'title_quantiles' argument