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 logic error in ScalarMappable.to_rgba #11002

Merged
merged 1 commit into from Apr 9, 2018

Conversation

timhoffm
Copy link
Member

@timhoffm timhoffm commented Apr 8, 2018

PR Summary

This fixes the logic error described in #10890.

@tacaswell tacaswell added this to the v2.2.3 milestone Apr 9, 2018
@tacaswell
Copy link
Member

I think this is a candidate for backport because it fixes a un-workaroundable bug in 2.2.2. I am not 100% on that, if someone else agrees merge away!

@jklymak
Copy link
Member

jklymak commented Apr 9, 2018

I actually am 98.5% sure its not a followed code path because of the new clipping for imshow (#10220). 0% codecov isn't very good ;-)

(i.e. max(x)>1 is always False)

@tacaswell
Copy link
Member

This is (for better or worse) a public function, I think the clipping happens when we set the data so using the 'standard' path this won't be hit, but using im.to_rgba(my_data) can still hit it.

@jklymak
Copy link
Member

jklymak commented Apr 9, 2018

Ah, fair enough.

OTOH, should it get a test if its public, including one to test if this error is properly called? But happy to see it merged if thats gilding the lily...

@efiring
Copy link
Member

efiring commented Apr 9, 2018

This is the sort of bugfix that I think does not warrant a test.

@efiring efiring merged commit 3f763a6 into matplotlib:master Apr 9, 2018
@timhoffm timhoffm deleted the fix-to_rgba-logic-error branch April 9, 2018 21:51
QuLogic added a commit that referenced this pull request Apr 10, 2018
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