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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -75,6 +75,11 @@ def test_SymLogNorm(): | |
_scalar_tester(norm, vals) | ||
_mask_tester(norm, vals) | ||
|
||
# Ensure that specifying vmin returns the same result as above | ||
norm = mcolors.SymLogNorm(3, vmin=-30, vmax=5, linscale=1.2) | ||
normed_vals = norm(vals) | ||
assert_array_almost_equal(normed_vals, expected) | ||
|
||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This isn't a main level function, so we only put one return between definitions. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Hi @pelson, sry I'm not quite sure I understand. Do you mean that you would like this in its own separate function? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I should have been more clear. PEP8 states that there should be just one newline between methods http://www.python.org/dev/peps/pep-0008/#blank-lines, but re-reading the code it turns out that these are indeed main level functions. My apologies. |
||
|
||
def _inverse_tester(norm_instance, vals): | ||
""" | ||
|
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
No reason, why
np.float
?consistency?
>>> type(np.float(3)) <type 'float'>