Conversation
examples/animation/animate_decay.py
Outdated
| Generates a decaying sine wave. | ||
| """ | ||
| count = 0 | ||
| while count < 1000: |
There was a problem hiding this comment.
Can you change this to a for count in range(1000): That is slightly more pythonic.
| M2*G*sin(state[2])*cos(del_) + | ||
| M2*L2*state[3]*state[3]*sin(del_) - | ||
| (M1 + M2)*G*sin(state[0]))/den1 | ||
| den1 = (mass1 + mass2)*length1 - mass2*length1*np.cos(del_)*np.cos(del_) |
There was a problem hiding this comment.
While you are here, please add relevant spaces around operators.
|
I made the requested changes. |
|
For the PEP8-related failures, I think Travis is simply complaining about this rule “Don't use spaces around the = sign when used to indicate a keyword argument or a default parameter value.” (see http://legacy.python.org/dev/peps/pep-0008/#other-recommendations) |
|
|
||
| ani = animation.FuncAnimation(fig, animate, np.arange(1, len(y)), | ||
| interval=25, blit=True, init_func=init) | ||
| interval = 25, blit = True, init_func = init) |
There was a problem hiding this comment.
@afvincent is correct. Spaces around = when it is assignment, no spaces when used in a function signature / call for kwargs.
There was a problem hiding this comment.
Sorry, forgot to run the pep8 checker before pushing. I've amended the commit, and it looks like it passes now.
e677a95 to
84165bc
Compare
|
How did you pick up a commit from Christoph? @adasilva I am not sure what your familiarity with git is. Could you rebase this onto current master and drop that first commit? Please ask questions if you need help. The rebase guide I like best is still a PR #2742 (I really should finish that). If this all seems like a disaster and git fights back I can take care of it. |
|
@tacaswell hmm, I'm not sure how that happened. I'm not very confident with rebasing, so let me check in on the process. I started following along the guide you linked to. So far, I added matplotlib/matplotlib as a remote: |
|
Actually I might be making this more difficult. I was using rebase to edit the previous commit where there were some small mistakes, and I think that is where I picked up the previous commit. If I run |
|
Yes, i think so. On Sat, May 28, 2016, 12:37 Ashley DaSilva notifications@github.com wrote:
|
|
@adasilva It sounds like you've got the idea, but you can grab me on facebook chat if it doesn't work. :) |
|
I removed the extra commit.... any advice on how to resolve the new issues of the failing checks? |
|
You can ignore the test failures. Coveralls have some issues with figuring out what to compare agains (and we don't have tests of examples anyway) and the tests that failed appveyor is known to be flaky. |
|
@jenshnielsen OK thanks! |
Cleaned up examples: animate_decay.py, double_pendulum_animated.py, and barh_demo.py