-
-
Notifications
You must be signed in to change notification settings - Fork 7.9k
Fix Issue 26821: [Bug]: ValueError: The truth value... when an ndarray is passed to the color kwarg of axes3d.scatter #26834
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
…to the color kwarg of axes3d.scatter
There is an argument for including a test (probably just a smoke test), but I don't fully want to block on that. |
sorry im not sure what a smoke test means but im happy to write a test! should i just include the code reproduction example? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you for opening your first PR into Matplotlib!
If you have not heard from us in a week or so, please leave a new comment below and that should bring it to our attention. 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.
"Smoke test" here mostly just means "check that it runs and doesn't error, but don't really need to make further assertions about it". In particular, I do not think this behavior needs an image comparison test. So more or less just wrapping what you have in a |
Co-authored-by: Kyle Sunden <[email protected]>
… truth value... when an ndarray is passed to the color kwarg of axes3d.scatter
Thanks @chiraagbalu and congratulations on your first merged PR in Matplotlib! Hope to see you around! |
…y is passed to the color kwarg of axes3d.scatter (matplotlib#26834) * FIX: [Bug]: ValueError: The truth value... when an ndarray is passed to the color kwarg of axes3d.scatter * added smoke test to ensure no value error is thrown * fixed smoke test to use fig canvas draw rather than plt show * added an extra line and reduced line length to comply with flake8 * removed trailing whitespace * Update lib/mpl_toolkits/mplot3d/tests/test_axes3d.py Co-authored-by: Kyle Sunden <[email protected]> --------- Co-authored-by: Kyle Sunden <[email protected]>
…834-on-v3.8.x Backport PR #26834 on branch v3.8.x (Fix Issue 26821: [Bug]: ValueError: The truth value... when an ndarray is passed to the color kwarg of axes3d.scatter)
PR summary
closes #26821
relevant issue: #26821
I made this change based off of timhoffm's comment under the issue about a potential fix. (#26821 (comment))
This PR allows for passing a numpy array to the color argument of ax.scatter when ax is initialized with projection='3d' instead of resulting in a ValueError
The changes passed the tests available for the relevant file (lib/mpl_toolkits/mplot3d/tests/test_axes3d.py), as well as that entire tests folder.
The changes also passed the code reproduction example in the joshuacnewton's bug summary (#26821 (comment))
PR checklist