Skip to content
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

Clean warnings in examples #6239

Merged
merged 7 commits into from Apr 1, 2016

Conversation

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

@@ -45,6 +45,6 @@
tick.tick2line.set_markersize(0)
tick.label1.set_horizontalalignment('center')

imid = len(r)/2
imid = int(len(r)/2)
Copy link
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
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

@@ -75,8 +75,13 @@
# 6
plt.figure()
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
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
Member

how far back do we want to backport this?

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

Lets just do back to 2.0 then.

tacaswell added a commit that referenced this pull request Apr 1, 2016
@tacaswell
Copy link
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.

None yet

4 participants