| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
Sorry, something went wrong.
|
OK so we can't just use to_rgba_array if the colour is "none", which doesn't happen in the tests but does in the docs... |
Sorry, something went wrong.
Is this related to #28475? |
Sorry, something went wrong.
Yes exactly. The array has zero size, so you get a StopIteration error when you try to call next. |
Sorry, something went wrong.
There was a problem hiding this comment.
I have been pondering for a time whether we should have an internal helper to loop over possibly list-type properties. This should take care of all the technical details like single value vs. list of values, properly handling sequence-like single values, optionally length checks (we currently don't have a clear policy whether we request the same size, or whether we are permissive and continuously cycle as long as needed, which may be handy in some cases but could hide a bug in others).
Sorry, something went wrong.
…719-on-v3.10.x Backport PR #29719 on branch v3.10.x (Fix passing singleton sequence-type styles to hist)
| Back | FazBrowse Home | New Git URL |
PR summary
Fixes #29717. Use of np.atleast_1d here is not appropriate for style properties expressed as tuples or array-likes. For colours we can just use to_rgba_array. For linestyles I factored out the logic used to set one or more linestyles in Collection.
We are already using to_rgba_array if colors is passed:
matplotlib/lib/matplotlib/axes/_axes.py
Lines 6997 to 6998 in 70d0bf7
PR checklist