X Tutup
Skip to content

Clean warnings in examples#6239

Merged
tacaswell merged 7 commits intomatplotlib:masterfrom
jenshnielsen:cleanexampleswarnings
Apr 1, 2016
Merged

Clean warnings in examples#6239
tacaswell merged 7 commits intomatplotlib:masterfrom
jenshnielsen:cleanexampleswarnings

Conversation

@jenshnielsen
Copy link
Copy Markdown
Member

These are mostly numpy warnings

  • Make sure indices are integers
  • The numpy check for positive-semidefinite has changes, so change the data in power_norm_demo.py to not see the warning
  • Dont forward trim from axisartist to ticker where it has no effect.

tick.label1.set_horizontalalignment('center')

imid = len(r)/2
imid = int(len(r)/2)
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

How about just len(r) // 2 (and the same in many other cases)?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

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
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

This name is a bit un-Pythonic, but otherwise the PR is fine.

@tacaswell tacaswell merged commit 0423430 into matplotlib:master Apr 1, 2016
@tacaswell
Copy link
Copy Markdown
Member

how far back do we want to backport this?

@jenshnielsen
Copy link
Copy Markdown
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.

@tacaswell
Copy link
Copy Markdown
Member

Lets just do back to 2.0 then.

tacaswell added a commit that referenced this pull request Apr 1, 2016
@tacaswell
Copy link
Copy Markdown
Member

backported to v2.x as c455e52

@jenshnielsen jenshnielsen deleted the cleanexampleswarnings branch April 2, 2016 11:06
@QuLogic QuLogic added this to the 2.0 (style change major release) milestone Apr 5, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants

X Tutup