Skip to content

Commit b0aee78

Browse files
authored
Merge pull request #32319 from meeseeksmachine/auto-backport-of-pr-32305-on-v3.11.x
Backport PR #32305 on branch v3.11.x (Improve error message for boxplot_stats function, by printing dimensions.)
2 parents a76ab4b + e0dc08e commit b0aee78

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

‎lib/matplotlib/cbook.py‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1266,7 +1266,8 @@ def _compute_conf_interval(data, med, iqr, bootstrap):
12661266
if labels is None:
12671267
labels = itertools.repeat(None)
12681268
elif len(labels) != ncols:
1269-
raise ValueError("Dimensions of labels and X must be compatible")
1269+
raise ValueError(f"The number of labels ({len(labels)}) must match the"
1270+
f" number of columns ({ncols}).")
12701271

12711272
input_whis = whis
12721273
for ii, (x, label) in enumerate(zip(X, labels)):

0 commit comments

Comments
 (0)