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

BUG: Fixed object type missmatch in SymLogNorm #2428

Merged
merged 1 commit into from Oct 8, 2013

Conversation

cpelley
Copy link

@cpelley cpelley commented Sep 17, 2013

Currently SymLogNorm accepts both linthresh and vmin, vmax with their
native dtype, meaning that the contents of one object cannot be updated
with another due to a mismatch of types.

a[masked] = log within _transform and _inv_transform requires both to be of the same type for such an operation.

Currently SymLogNorm accepts both linthresh and vmin, vmax with their
native dtype, meaning that the contents of one object cannot be updated
with another due to a mismatch of types.
@@ -1054,7 +1054,7 @@ def __init__(self, linthresh, linscale=1.0,
the logarithmic range. Defaults to 1.
"""
Normalize.__init__(self, vmin, vmax, clip)
self.linthresh = linthresh
self.linthresh = float(linthresh)
Copy link
Member

Choose a reason for hiding this comment

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

Why not np.float?

Copy link
Author

Choose a reason for hiding this comment

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

Thanks for your interest @pelson

Why not np.float?

No reason, why np.float?
consistency?

>>> type(np.float(3)) <type 'float'>

@pelson
Copy link
Member

pelson commented Sep 17, 2013

👍 from me. @dmcdougall - this was your bug - wanna merge? 😄

@Tillsten
Copy link
Contributor

Nope, that's one is mine! MINE! :) LGTM

@pelson
Copy link
Member

pelson commented Oct 1, 2013

Looks like this is a bugfix which we should be applying to v1.3.x. @mdboom - I think that ship has probably sailed though, right?

@mdboom
Copy link
Member

mdboom commented Oct 1, 2013

We can still apply it to 1.3.x, but it's too late for 1.3.1. (Though it could end up in 1.3.2 if we do one.)

@mdboom
Copy link
Member

mdboom commented Oct 1, 2013

@pelson: It appears that some of your questions are not yet addressed. I leave it to you to determine when this is ready to merge. Then you or I can cherry-pick this to 1.3.x.

pelson added a commit that referenced this pull request Oct 8, 2013
BUG: Fixed object type missmatch in SymLogNorm
@pelson pelson merged commit 92766bb into matplotlib:master Oct 8, 2013
@pelson
Copy link
Member

pelson commented Oct 8, 2013

Cherry picked to v1.3.x: e4b768c

@pelson
Copy link
Member

pelson commented Oct 8, 2013

Merged v1.3.x back to master: ba49375

@cpelley cpelley deleted the symlognorm_fix branch October 10, 2013 12:44
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