Squeeze post-converted values when validating limits#26597
Merged
QuLogic merged 1 commit intomatplotlib:mainfrom Aug 30, 2023
Merged
Squeeze post-converted values when validating limits#26597QuLogic merged 1 commit intomatplotlib:mainfrom
QuLogic merged 1 commit intomatplotlib:mainfrom
Conversation
story645
approved these changes
Aug 25, 2023
QuLogic
reviewed
Aug 26, 2023
QuLogic
reviewed
Aug 29, 2023
Comment on lines
+317
to
+319
| # Numpy 1.25 deprecated casting [2.] to float, catch_warnings added to error on main | ||
| # can be removed once the minimum numpy version has expired the warning |
Member
There was a problem hiding this comment.
"to error on main" should be "to avoid error on main"? I'm pretty sure this test doesn't error...
Member
Author
There was a problem hiding this comment.
I meant to error on main prior to this patch being applied
Comment on lines
+319
to
+323
| with warnings.catch_warnings(): | ||
| f, ax = plt.subplots() | ||
| ax.plot(["a", "b", "c", "d"], [1, 2, 3, 4]) | ||
| ax.set_xlim("b", "c") |
Member
There was a problem hiding this comment.
Suggested change
| with warnings.catch_warnings(): | |
| f, ax = plt.subplots() | |
| ax.plot(["a", "b", "c", "d"], [1, 2, 3, 4]) | |
| ax.set_xlim("b", "c") | |
| f, ax = plt.subplots() | |
| ax.plot(["a", "b", "c", "d"], [1, 2, 3, 4]) | |
| with warnings.catch_warnings(): | |
| ax.set_xlim("b", "c") |
ksunden
commented
Aug 29, 2023
Comment on lines
+317
to
+319
| # Numpy 1.25 deprecated casting [2.] to float, catch_warnings added to error on main | ||
| # can be removed once the minimum numpy version has expired the warning |
Member
Author
There was a problem hiding this comment.
I meant to error on main prior to this patch being applied
Comment on lines
+317
to
+319
| # Numpy 1.25 deprecated casting [2.] to float, catch_warnings added to error on main | ||
| # can be removed once the minimum numpy version has expired the warning |
Member
Author
There was a problem hiding this comment.
Suggested change
| # Numpy 1.25 deprecated casting [2.] to float, catch_warnings added to error on main | |
| # can be removed once the minimum numpy version has expired the warning | |
| # Numpy 1.25 deprecated casting [2.] to float, catch_warnings added to error | |
| # without patch | |
| # can be removed once the minimum numpy version has expired the warning |
Closes matplotlib#26596 Ensures that ndarrays can be passed to later on. In this particular case, we know that we expect a single value.
QuLogic
approved these changes
Aug 30, 2023
meeseeksmachine
pushed a commit
to meeseeksmachine/matplotlib
that referenced
this pull request
Aug 30, 2023
meeseeksmachine
pushed a commit
to meeseeksmachine/matplotlib
that referenced
this pull request
Aug 30, 2023
QuLogic
added a commit
that referenced
this pull request
Aug 31, 2023
…597-on-v3.7.x Backport PR #26597 on branch v3.7.x (Squeeze post-converted values when validating limits)
ksunden
added a commit
that referenced
this pull request
Aug 31, 2023
…597-on-v3.8.x Backport PR #26597 on branch v3.8.x (Squeeze post-converted values when validating limits)
wavebyrd
pushed a commit
to wavebyrd/matplotlib
that referenced
this pull request
Mar 13, 2026
wavebyrd
pushed a commit
to wavebyrd/matplotlib
that referenced
this pull request
Mar 13, 2026
…t-of-pr-26597-on-v3.7.x Backport PR matplotlib#26597 on branch v3.7.x (Squeeze post-converted values when validating limits)
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
Closes #26596
Ensures that ndarrays can be passed to later on. In this particular case, we know that we expect a single value.
PR checklist