| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
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.
Sorry, something went wrong.
| self.vmax = A.max() | ||
| # Ensure that A has non-zero size to compute min/max. | ||
| # Otherwise put in filler values. | ||
| if A.size: |
There was a problem hiding this comment.
This is hitting alot of use cases as all of the color mappables to through here, would it be possible to do this check in hexbin instead?
If we do this here, do we want to use the same logic from the auto limit on the Axis to sure min != max (which I forsee causing divide by 0 errors later)?
Sorry, something went wrong.
| self.vmax = A.max() | ||
| else: | ||
| self.vmin = 0.0 | ||
| self.vmax = 0.0 |
There was a problem hiding this comment.
Setting these values to zero seems almost certainly wrong; the pre-#21989 behavior was (I think?) to set them to np.ma.masked (I think?) which also seems a bit strange but already better.
Sorry, something went wrong.
|
Please take a look now. I pushed the fix further upstream and also used masked instead of 0.0. Maybe you have some more elegant ideas; however, this does fix the problem and pass the additional test without touching non-hexbin optimized code paths. |
Sorry, something went wrong.
There was a problem hiding this comment.
Looks good to me - thanks for the PR!
Sorry, something went wrong.
… empty arrays and log scaling.
|
Thanks @erykoff and congratulations on your first contribution to Matplotlib. |
Sorry, something went wrong.
…944-on-v3.6.x Backport PR #23944 on branch v3.6.x (FIX: ValueError when hexbin is run with empty arrays and log scaling.)
…matplotlib#23944) * Add test for empty hexbin with log scaling. * Use guarded autoscale_None for use when vmin/vmax are None. * Add additional check when auto vmin/vmax are None.
| Back | FazBrowse Home | New Git URL |
PR Summary
PR Checklist
Tests and Styling
Documentation