Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Fix some test warnings#7336

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
Kojoley merged 9 commits intomatplotlib:v2.xfromQuLogic:fix-test-warnings
Oct 27, 2016
Merged

Conversation

QuLogic
Copy link
Member

Some of these are expected and can either be ignored or tested against. Others just require a small tweak to get working. See commit messages for some details.

There are still a few warnings left, such as#7334, though.

@QuLogicQuLogic added this to the2.0 (style change major release) milestoneOct 24, 2016
inv_total = np.where(total > 0, 1./total, 0)
inv_total = np.zeros_like(total)
mask = total > 0
inv_total[mask] = 1.0 / total[mask]
Copy link
Member

Choose a reason for hiding this comment

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

inv_total=np.reciprocal(total)inv_total[total<=0]=0

Copy link
MemberAuthor

Choose a reason for hiding this comment

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

np.reciprocal also warns about division by zero, which is the main reason for this change.

Copy link
Member

Choose a reason for hiding this comment

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

Ah, I have missed the warning message when triednp.reciprocal

warnings.filterwarnings('ignore',
'The finance module has been deprecated in mpl 2',
MatplotlibDeprecationWarning)
from pylab import *
Copy link
Member

Choose a reason for hiding this comment

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

Does the warning makes any sense?
This will also create a merge conflict to master.

Copy link
MemberAuthor

Choose a reason for hiding this comment

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

Well, that's a question for a different issue/PR, I think.

Anything done here will cause a conflict withmaster, probably. We could backport your entire change to this file, but I thought that might be a bit drastic.

'ignore',
'The set_color_cycle attribute was deprecated in version 1.5.',
MatplotlibDeprecationWarning)

Copy link
Member

Choose a reason for hiding this comment

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

This is fixed in the master already.

Copy link
MemberAuthor

Choose a reason for hiding this comment

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

Hmm, yes, I'll backport that instead so it doesn't generate much conflicts.

@@ -173,7 +171,7 @@ def test_throw_rendering_complexity_exceeded():
try:
fig.savefig(io.BytesIO())
finally:
rcParams['path.simplify'] = True
plt.rcParams['path.simplify'] = True
Copy link
Member

Choose a reason for hiding this comment

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

The test hascleanup decorator on it, why there is a manual cleanup?

Copy link
MemberAuthor

Choose a reason for hiding this comment

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

I don't know; I just backported the warning fixes from master (i.e., removal ofpylab.)

@tacaswelltacaswell changed the titleFix some test warnings[MRG+1] Fix some test warningsOct 25, 2016
@KojoleyKojoley merged commit1b666c5 intomatplotlib:v2.xOct 27, 2016
@KojoleyKojoley changed the title[MRG+1] Fix some test warningsFix some test warningsOct 27, 2016
@QuLogicQuLogic deleted the fix-test-warnings branchOctober 27, 2016 23:44
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Reviewers

@tacaswelltacaswelltacaswell approved these changes

@KojoleyKojoleyKojoley approved these changes

Assignees
No one assigned
Projects
None yet
Milestone
v2.0.0
Development

Successfully merging this pull request may close these issues.

4 participants
@QuLogic@tacaswell@Kojoley@jenshnielsen

[8]ページ先頭

©2009-2025 Movatter.jp