-
Notifications
You must be signed in to change notification settings - Fork 232
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Having title_quantiles=None when quantiles is passed without having exactly 3 elements raises a ValueError #237
Comments
As a regular |
Well I have not specified it explicitly in the issue description above, but the problem is that
Thus passing a list with arbitrary length should not raise any exception (and it also means that upgrading to corner==2.2.2 breaks codes that were working fine with previous versions). To clarify even more, here is the expected behaviour if you run the example code above with corner=2.2.1:
|
I really dont see any problem with this. |
The main problem is backward compatibility: any code that ran smoothly before v2.2.2 now breaks, even if the Anyway, I submitted as a suggestion pull request #244, hopefully it restores backward compatibility while maintaining the expected behaviour of |
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 fortitle_quantiles
is set as what is passed forquantiles
, and aValueError
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/):
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
The text was updated successfully, but these errors were encountered: