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

Updated examples to be PEP compliant#307

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
murrayrm merged 12 commits intopython-control:masterfrombilltubbs:bt-tests
Jun 9, 2019
Merged

Updated examples to be PEP compliant#307

murrayrm merged 12 commits intopython-control:masterfrombilltubbs:bt-tests
Jun 9, 2019

Conversation

billtubbs
Copy link
Contributor

@billtubbsbilltubbs commentedJun 8, 2019
edited
Loading

Made various edits to all the example scripts including:

  • Replaced Python 2.7print statements withprint(...)
  • Removed MATLAB-like formatting such as semi-colons
  • Changed indenting and syntax to be PEP compliant (using PyCharm)
  • Changed imports fromfrom ___ import * to conventions such asimport matplotlib.pyplot as plt andimport numpy as np
  • Removed tabs
  • Added the following line to scripts that produce plot output:
if 'PYCONTROL_TEST_EXAMPLES' not in os.environ:    plt.show()

Outstanding issues:

  • Some examples still use out-datednp.matrix

Removed MATLAB-like formatting such as semi-colons, syntax and indenting PEP compliant (using PyCharm), changed imports from `from ___ import *` to things like `import matplotlib.pyplot as plt` and `import numpy as np`, removed tabs
@coveralls
Copy link

coveralls commentedJun 8, 2019
edited
Loading

Coverage Status

Coverage remained the same at 80.936% when pulling5648440 on billtubbs:bt-tests into8a11cd3 on python-control:master.

if ax.get_label() == 'control-bode-magnitude':
break
ax.semilogx([1e-4, 1e3], 20 *np.log10([1, 1]), 'k-')
ax.semilogx([1e-4, 1e3], 20*np.log10([1, 1]), 'k-')
Copy link
Member

Choose a reason for hiding this comment

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

Should this be indented? It means that it could get executed multiple times?

Copy link
ContributorAuthor

Choose a reason for hiding this comment

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

Oops! I misunderstood that. Will revert it back.

Copy link
Member

Choose a reason for hiding this comment

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

Looks like this line is still indented and shouldn't be?

@murrayrm
Copy link
Member

@billtubbs Did a quick look through the changes. Overall they look good! Some small comments/questions for you to consider, but I think this is fine as is. Will give you a chance to update in case any of the comments resonate, but then we can merge these in.

@murrayrmmurrayrm merged commitc99f72f intopython-control:masterJun 9, 2019
@billtubbsbilltubbs deleted the bt-tests branchJune 9, 2019 03:21
@murrayrmmurrayrm mentioned this pull requestJun 9, 2019
@murrayrmmurrayrm added this to the0.8.3 milestoneJan 4, 2020
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Reviewers

@murrayrmmurrayrmmurrayrm left review comments

Assignees
No one assigned
Labels
None yet
Projects
None yet
Milestone
0.8.3
Development

Successfully merging this pull request may close these issues.

3 participants
@billtubbs@coveralls@murrayrm

[8]ページ先頭

©2009-2025 Movatter.jp