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

Fix rubberbanding on wx+py3.10.#21990

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:mainfromanntzer:wxband
Dec 17, 2021
Merged

Conversation

anntzer
Copy link
Contributor

@anntzeranntzer commentedDec 17, 2021
edited
Loading

Locally (Arch standard packages), it otherwise fails with

File "/usr/lib/python3.10/site-packages/wx/core.py", line 1098, in _DC_DrawLineList
return self._DrawLineList(lines, pens, [])
TypeError: 'numpy.float64' object cannot be interpreted as an integer

Likely the same root cause as#19395.

PR Summary

PR Checklist

Tests and Styling

  • Has pytest style unit tests (andpytest passes).
  • IsFlake 8 compliant (installflake8-docstrings and runflake8 --docstring-convention=all).

Documentation

  • New features are documented, with examples if plot related.
  • New features have an entry indoc/users/next_whats_new/ (follow instructions in README.rst there).
  • API changes documented indoc/api/next_api_changes/ (follow instructions in README.rst there).
  • Documentation is sphinx and numpydoc compliant (the docs shouldbuild without error).

@anntzeranntzer added this to thev3.5.2 milestoneDec 17, 2021
@anntzer
Copy link
ContributorAuthor

Added a minimal smoketest for draw_rubberband.

Locally (Arch standard packages), it otherwise fails with  File "/usr/lib/python3.10/site-packages/wx/core.py", line 1098, in _DC_DrawLineList    return self._DrawLineList(lines, pens, [])TypeError: 'numpy.float64' object cannot be interpreted as an integer
@@ -128,6 +128,8 @@ def check_alt_backend(alt_backend):
"matplotlib.backends.backend_{}".format(backend))

ax.plot([0, 1], [2, 3])
if fig.canvas.toolbar: # i.e toolbar2.
fig.canvas.toolbar.draw_rubberband(None, 1., 1, 2., 2)
Copy link
Member

Choose a reason for hiding this comment

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

codecov claims this line isn't being tested - is that a CI issue or is the if statement never being executed anywhere?

Copy link
ContributorAuthor

Choose a reason for hiding this comment

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

At least locally, I can confirm that this is indeed executed...

Copy link
Member

Choose a reason for hiding this comment

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

This line is run for all backends, and we skip a few, so it seems to be referring to that.

@QuLogicQuLogic merged commit0b43f2f intomatplotlib:mainDec 17, 2021
meeseeksmachine pushed a commit to meeseeksmachine/matplotlib that referenced this pull requestDec 17, 2021
@anntzeranntzer deleted the wxband branchDecember 17, 2021 23:11
QuLogic added a commit that referenced this pull requestDec 18, 2021
…990-on-v3.5.xBackport PR#21990 on branch v3.5.x (Fix rubberbanding on wx+py3.10.)
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Reviewers

@QuLogicQuLogicQuLogic approved these changes

@dstansbydstansbydstansby approved these changes

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

Successfully merging this pull request may close these issues.

3 participants
@anntzer@QuLogic@dstansby

[8]ページ先頭

©2009-2025 Movatter.jp