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
Conversation
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) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why not np.float
?
There was a problem hiding this comment.
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'>
👍 from me. @dmcdougall - this was your bug - wanna merge? 😄 |
Nope, that's one is mine! MINE! :) LGTM |
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? |
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.) |
@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. |
BUG: Fixed object type missmatch in SymLogNorm
Cherry picked to v1.3.x: e4b768c |
Merged v1.3.x back to master: ba49375 |
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.