Repository navigation
Fix the way to get xs length in set_3d_properties() - #20555
Conversation
The `xs` is a 1D array that may not have a `shape` attribute.
There was a problem hiding this comment.
Thank you for opening your first PR into Matplotlib!
If you have not heard from us in a while, please feel free to ping @matplotlib/developers or anyone who has commented on the PR. Most of our reviewers are volunteers and sometimes things fall through the cracks.
You can also join us on gitter for real-time discussion.
For details on testing, writing docs, and our review process, please see the developer guide
We strive to be a welcoming and open project. Please follow our Code of Conduct.
|
Thanks for working on this. This definitively should get a test so we do not regress this in the future. Are we sure that this is the right place to fix this? I suspect so as we want to preserve the xdata as a list as long as possible? It looks like this use of |
|
Yes, I'm sure. The For matplotlib/lib/matplotlib/lines.py Lines 1219 to 1229 in 08f4629 matplotlib/lib/matplotlib/lines.py Lines 967 to 978 in 070e093 matplotlib/lib/mpl_toolkits/mplot3d/art3d.py Lines 172 to 177 in 357db6d https://numpy.org/doc/stable/reference/generated/numpy.broadcast_to.html |
|
Please move out of drafts and remove the "needs tests" when the tests are added. Thanks! |
|
Re tuple vs. int: |
|
Now, it's official: broadcast_to supports int as shape. |
The
xsis a 1D array that may not have ashapeattribute.