Thanks to visit codestin.com
Credit goes to github.com

Skip to content

BUG : fix PowerNorm with scalars #4055

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 4 commits into from
Feb 1, 2015

Conversation

tacaswell
Copy link
Member

closes #4053

@tacaswell tacaswell added this to the v1.4.3 milestone Jan 30, 2015
@tacaswell
Copy link
Member Author

@matplotlib/developers Can someone take a look at this today?

@jenshnielsen
Copy link
Member

The fix looks correct to me and I can confirm that it resolves the issue.

Looking at that piece of code for the first time I don't understand how clip bool is supposed to work.
It assigns values to an array called val which is never used as far as I can see.
This is confirmed by trying to do cNorm2(120) which returns 1.20202020202 regardless of whether clip is True or False (with vmax=100). The solution should be to assign result rather than val but it would need a test too.

I don't think this is a new issue so I am fine with merging this as is and cutting 1.4.3 and postponing the clip issue to 1.4.x

These tests are currently failing and should be fixed by the next commit.
@jenshnielsen
Copy link
Member

@tacaswell I submitted a pr against your branch which I think should address the clip issue. If you think this is to high risk I am fine with merging this as is and postponing it to 1.4.x as I said above.

Fix issue with clipping of Power Norm
@tacaswell
Copy link
Member Author

@jenshnielsen Looks good. If travis passes I will merge this PR.

tacaswell added a commit that referenced this pull request Feb 1, 2015
BUG : fix PowerNorm with scalars

Merging own PR due to prior review by @jenshnielsen
@tacaswell tacaswell merged commit c142407 into matplotlib:v1.4.x Feb 1, 2015
@tacaswell tacaswell deleted the power_norm_fix branch May 16, 2015 03:23
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.

2 participants