Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Squeeze post-converted values when validating limits#26597

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
QuLogic merged 1 commit intomatplotlib:mainfromksunden:squeeze_lims
Aug 30, 2023

Conversation

ksunden
Copy link
Member

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

@ksundenksunden added this to thev3.7.3 milestoneAug 25, 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
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

"to error on main" should be "to avoid error on main"? I'm pretty sure this test doesn't error...

Copy link
MemberAuthor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

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")
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

Suggested change
withwarnings.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])
withwarnings.catch_warnings():
ax.set_xlim("b","c")

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
Copy link
MemberAuthor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

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
Copy link
MemberAuthor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

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

Closesmatplotlib#26596Ensures that ndarrays can be passed to  later on. In this particular case, we know that we expect a single value.
@QuLogicQuLogic merged commit45a97b0 intomatplotlib:mainAug 30, 2023
meeseeksmachine pushed a commit to meeseeksmachine/matplotlib that referenced this pull requestAug 30, 2023
meeseeksmachine pushed a commit to meeseeksmachine/matplotlib that referenced this pull requestAug 30, 2023
QuLogic added a commit that referenced this pull requestAug 31, 2023
…597-on-v3.7.xBackport PR#26597 on branch v3.7.x (Squeeze post-converted values when validating limits)
ksunden added a commit that referenced this pull requestAug 31, 2023
…597-on-v3.8.xBackport PR#26597 on branch v3.8.x (Squeeze post-converted values when validating limits)
@ksundenksunden mentioned this pull requestSep 15, 2023
5 tasks
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Reviewers

@QuLogicQuLogicQuLogic approved these changes

@story645story645story645 approved these changes

Assignees
No one assigned
Labels
None yet
Projects
None yet
Milestone
v3.7.3
Development

Successfully merging this pull request may close these issues.

[Bug]: Deprecation warning from numpy when setting limits on categorical axis with categories
3 participants
@ksunden@QuLogic@story645

[8]ページ先頭

©2009-2025 Movatter.jp