Skip to content

fix "is" comparison for np.array - #22957

Merged
QuLogic merged 1 commit into
matplotlib:mainfrom
raphaelquast:fix_QuadMesh_cursor_data
May 2, 2022
Merged

QuLogic merged 1 commit into
matplotlib:mainfrom
raphaelquast:fix_QuadMesh_cursor_data

Conversation

@raphaelquast

@raphaelquast raphaelquast commented May 2, 2022

Copy link
Copy Markdown
Contributor

PR Summary

fixes incorrect check if numpy array is none.

  • if x fails for numpy arrays due to array-broadcasting!
  • if x is None does what it should...

PR Checklist

Tests and Styling

  • Has pytest style unit tests (and pytest passes).
  • Is Flake 8 compliant (install flake8-docstrings and run flake8 --docstring-convention=all).

Documentation

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

@raphaelquast raphaelquast mentioned this pull request May 2, 2022
6 tasks
Comment thread lib/matplotlib/collections.py
@timhoffm timhoffm added this to the v3.5.2 milestone May 2, 2022
@greglucas

Copy link
Copy Markdown
Contributor

It would be nice to get a test for this too, so we don't hit this path again on accident.

I just put up some tests for another PR #22955 in the contains() portion of the code: 6c22e86
A similar test or two could be added here for the get_cursor_data() function.

@QuLogic

QuLogic commented May 2, 2022

Copy link
Copy Markdown
Member

Feel free to open a followup with the test; I want to merge to get 3.5.2 out.

@QuLogic
QuLogic merged commit 2aa71eb into matplotlib:main May 2, 2022
@QuLogic

QuLogic commented May 2, 2022

Copy link
Copy Markdown
Member

meeseeksdev backport to v3.5.x

meeseeksmachine pushed a commit to meeseeksmachine/matplotlib that referenced this pull request May 2, 2022
QuLogic added a commit that referenced this pull request May 2, 2022
…957-on-v3.5.x

Backport PR #22957 on branch v3.5.x (fix "is" comparison for np.array)
@raphaelquast
raphaelquast deleted the fix_QuadMesh_cursor_data branch December 5, 2022 09:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants