Skip to content
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 our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix "is" comparison for np.array #22957

Merged
merged 1 commit into from
May 2, 2022

Conversation

raphaelquast
Copy link
Contributor

@raphaelquast raphaelquast commented May 2, 2022

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
lib/matplotlib/collections.py Show resolved Hide resolved
@timhoffm timhoffm added this to the v3.5.2 milestone May 2, 2022
@greglucas
Copy link
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
Copy link
Member

QuLogic commented May 2, 2022

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

QuLogic commented May 2, 2022

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.

None yet

4 participants