-
-
Notifications
You must be signed in to change notification settings - Fork 7.9k
For single datasets, don't wrap artist added by Axes.hist in silent_list #13656
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
Conversation
I am 👎 on this due to the type instability (for the same reason What is the motivation for this other than the improved repr? |
The point is mainly to improve the repr, but also so that in the most common case (histtype="bar" + single dataset), the returned artist is actually what got added to ax.containers rather than it being unpacked and repacked To be clear: previously, the return types were
With this PR:
So there is no additional type instability (well, except for the fact that hist's return type is already a total mess). The relevant type changes are, once again:
|
I'm 50/50 on type stability. There are prominent examples that return different types depending on the input, e.g.
IMHO it makes sense to have both
With an existing API there's the additional problem of introducing an API change. I haven't made up my mind if it's worth it. However, we should try to have a consistent way of handling this topic and not just change one isolated function. |
I was misunderstanding things, this is switching a silent list for a tuple sub-class. Still an API change, but a much smaller one than I thought. Anyone can merge on green. |
f058198
to
e78f713
Compare
should be good to go post-ci. |
Sphinx warnings:
|
See details in changelog note.
See details in changelog note.
PR Summary
PR Checklist