Error on bad input to hexbin extents#27607
Merged
QuLogic merged 2 commits intomatplotlib:mainfrom Jan 11, 2024
Merged
Conversation
7 tasks
ksunden
requested changes
Jan 8, 2024
| if extent is not None: | ||
| xmin, xmax, ymin, ymax = extent | ||
| if xmin > xmax: | ||
| raise ValueError("In extent, xmin must be greater than xmax") |
Member
There was a problem hiding this comment.
This error message is backwards (in both X and y)
Member
|
Requires updating the new test as well |
46a9e2a to
928e58c
Compare
ksunden
approved these changes
Jan 9, 2024
Member
ksunden
left a comment
There was a problem hiding this comment.
Looks like there was a network error affecting some CI; rerunning the main tests but assuming those are good, LGTM.
QuLogic
reviewed
Jan 9, 2024
Co-authored-by: Elliott Sales de Andrade <quantum.analyst@gmail.com>
QuLogic
approved these changes
Jan 11, 2024
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
PR summary
If xmin/xmax or ymin/ymax are the wrong way around in
hexbin(), raise an error. As noted in #18875 (which this is pulled from), this prevents issues with the hexbin marginals not being displayed at all if they are requested.PR checklist