| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
Sorry, something went wrong.
| "and will be removed %(removal)s; pass a 1D array instead.") | ||
| x = np.atleast_1d(x.squeeze()) | ||
|
|
||
| for part in x: |
There was a problem hiding this comment.
I think you can use np.any?
Sorry, something went wrong.
There was a problem hiding this comment.
Thanks, np.any(x<0) is neater!
Sorry, something went wrong.
|
Thanks for the PR. This should probably get a test as well... |
Sorry, something went wrong.
|
@jklymak Sure, I will add the test. |
Sorry, something went wrong.
|
Thanks for you contribution, hoping to see you around again :) |
Sorry, something went wrong.
|
@anntzer Happy to help! Thanks for this great opportunity. |
Sorry, something went wrong.
| Back | FazBrowse Home | New Git URL |
PR Summary
Issue #15923
Axes.pie accepts negative values which outputs the wrong pie chart. This issue is caused by not checking the positive and negative of all input wedge sizes of "x" in Axes.pie.
Now it will raise a ValueError, which indicates wedge sizes should be non-negative when feeding negative values into Axes.pie. It is done by adding an if condition right before calculating the portion of all sizes in the "x" `array.
PR Checklist