-
-
Notifications
You must be signed in to change notification settings - Fork 7.9k
2d padding #2731
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
2d padding #2731
Conversation
The failures look unrelated for these changes. I closed the other PR. |
self.axes_column = [[] for i in range(self._ncols)] | ||
self.axes_row = [[] for i in range(self._nrows)] | ||
self.axes_column = [[] for _ in range(self._ncols)] | ||
self.axes_row = [[] for _ in range(self._nrows)] |
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 the variable change?
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.
Because i
is not used in the expression, I have replaced it with _
, which is considered as a "throw-away" variable identifier (see for instance http://stackoverflow.com/questions/1739514/as-variable-name-in-python)
I have a few concerns about code style, mostly the inline if statements and the change of inner variables to Functionality wise, looks good to me. This module (and basically all of |
I have fixed the controversial things except renames to _ (at least for the time being) for reasons mentioned above. |
Hi there, do I have to do something now to get this moving again (such as writing about it to the mailing list)? |
@matejak Hopefully I will get this merged very soon (travis is not loading for me tonight...). I still do not like the |
@@ -335,8 +345,8 @@ def _update_locators(self): | |||
v = [] | |||
|
|||
v_ax_pos = [] | |||
v_cb_pos = [] | |||
for ax in self._row_refax[::-1]: | |||
v_cbI#_pos = [] |
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 is there a '#
' in here?
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.
For your reference, it was Vim typo (pressed I followed by # thinking that I am in normal mode)
I dare to disagree about the underscore (ie _), from my POV, it is a clear message saying "this variable is dummy, we claim that it is not used anywhere" and syntax checkers such as pylint are aware of this. |
I don't feel strongly enough to demand you change the variables back, but that vim typo should probably be fixed. Can you also add entries to CHANGELOG, api_changes.rst, and whats_new.rst? |
I have rebased to the current master (hopefully, I am not so closely familiar with Git) and also committed descriptions you have kindly suggested. |
Used to be here: #2466 (comment)
This feature is useful in cases such as showing the same section of an image with different colorbar ranges.

Since colorbars have to be labelled, it is not possible to get things right when using the same horizontal and vertical spacing.
I attach an image (you can obtain it by running the demo script or by generating the documentation, the new functionality is the image to the right).
I think that I haven't broken anything since the documentation generation did not complain. However, I don't know how to write tests for this feature.