Clean warnings in examples#6239
Merged
tacaswell merged 7 commits intomatplotlib:masterfrom Apr 1, 2016
Merged
Conversation
Fixes a numpy warning. The old matrix was positive-semidefinite according to the old check in numpy but it seems this has changed a bit
| tick.label1.set_horizontalalignment('center') | ||
|
|
||
| imid = len(r)/2 | ||
| imid = int(len(r)/2) |
Member
There was a problem hiding this comment.
How about just len(r) // 2 (and the same in many other cases)?
Member
Author
There was a problem hiding this comment.
Sure, I dont have any strong preference for one over the other
| M = np.zeros(U.shape, dtype='bool') | ||
| M[U.shape[0]/3:2*U.shape[0]/3, | ||
| U.shape[1]/3:2*U.shape[1]/3] = True | ||
| XMaskStart = U.shape[0]//3 |
Member
There was a problem hiding this comment.
This name is a bit un-Pythonic, but otherwise the PR is fine.
Member
|
how far back do we want to backport this? |
Member
Author
|
I probably made a bit of a mess of this 58a27bf does not make sense to backport further than 2.0 (since it relates to a arg deprecated in 2.0) Thes rest could be back ported to 1.5.x, The numpy related changes are probably the most serious ones. They will brake code with some future version of numpy. |
Member
|
Lets just do back to 2.0 then. |
Member
|
backported to v2.x as c455e52 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
These are mostly numpy warnings