Skip to content

Fix imshow()ing PIL-opened images. #13405

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

Merged
merged 1 commit into from
Feb 12, 2019
Merged

Conversation

anntzer
Copy link
Contributor

@anntzer anntzer commented Feb 11, 2019

We actually handle grayscale images just fine, but they need to be
transformed into masked arrays like everyone else.

Closes #12140 (regression in 2.1.0), so maybe worth backporting to 2.2.x.

PR Summary

PR Checklist

  • Has Pytest style unit tests
  • Code is Flake 8 compliant
  • New features are documented, with examples if plot related
  • Documentation is sphinx and numpydoc compliant
  • Added an entry to doc/users/next_whats_new/ if major new feature (follow instructions in README.rst there)
  • Documented in doc/api/api_changes.rst if API changed in a backward-incompatible way

We actually handle grayscale images just fine, but they need to be
transformed into masked arrays like everyone else.
@anntzer anntzer added this to the v3.1.0 milestone Feb 11, 2019
@tacaswell tacaswell modified the milestones: v3.1.0, v2.2.4 Feb 11, 2019
Copy link
Member

@tacaswell tacaswell left a comment

Choose a reason for hiding this comment

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

More compatibility with less code!

@anntzer
Copy link
Contributor Author

anntzer commented Feb 11, 2019

I think we should have yearly "only allowed to delete old, useless, bug-causing code chunks" periods...

@tacaswell tacaswell closed this Feb 11, 2019
@tacaswell tacaswell reopened this Feb 11, 2019
@tacaswell
Copy link
Member

power-cycled to get the fix from master.

@jklymak jklymak merged commit 0e2b9b1 into matplotlib:master Feb 12, 2019
meeseeksmachine pushed a commit to meeseeksmachine/matplotlib that referenced this pull request Feb 12, 2019
meeseeksmachine pushed a commit to meeseeksmachine/matplotlib that referenced this pull request Feb 12, 2019
@anntzer anntzer deleted the pil_imshow branch February 12, 2019 06:13
timhoffm added a commit that referenced this pull request Feb 12, 2019
…405-on-v2.2.x

Backport PR #13405 on branch v2.2.x (Fix imshow()ing PIL-opened images.)
dstansby added a commit that referenced this pull request Feb 12, 2019
…405-on-v3.0.x

Backport PR #13405 on branch v3.0.x (Fix imshow()ing PIL-opened images.)
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.

plt.imshow() error on PIL-opened tiff images
3 participants