Re: Misc. Codegen Issues

2012-08-23 Thread Ondřej Čertík
Hi David, Thank you for your patches. Would you please mind sending them as a github pull request against the repository here: https://github.com/sympy/sympy ? Also, can you send this email to the sympy mailinglist: http://groups.google.com/group/sympy That way more people will see it. We

Re: [sympy] LagrangesMethod class for sympy.physics.mechanics. (#1460)

2012-08-10 Thread Ondřej Čertík
@gilbertgede, @moorepants, are you ok with pusing this in? It looks good to me. @angadhn, for the future, see here how to write good commit messages: https://plus.google.com/u/0/104039945248245758823/posts/GcJmpxCVDfg So for example instead of More edits. it's better to explain what exactly you

Re: [sympy] Autorat (#1470)

2012-08-10 Thread Ondřej Čertík
This looks good enough, so I am merging it. We can improve upon the master if needed. --- Reply to this email directly or view it on GitHub: https://github.com/sympy/sympy/pull/1470#issuecomment-7651589 -- You received this message because you are subscribed to the Google Groups sympy-patches

Re: [sympy] Kinetic and potential energy functionality. (#1407)

2012-08-09 Thread Ondřej Čertík
Thanks. This PR is +1 from me. I am just waiting for one last pass of Stefan's bot to make sure the make html passes as well, and then I'll merge it. --- Reply to this email directly or view it on GitHub: https://github.com/sympy/sympy/pull/1407#issuecomment-7616275 -- You received this

Re: [sympy] Kinetic and potential energy functionality. (#1407)

2012-08-09 Thread Ondřej Čertík
Ok, so the make html has to be fixed. @angadhn, are you able to reproduce the warning? Just do make html, try to build the docs and see if you can see the warning. --- Reply to this email directly or view it on GitHub: https://github.com/sympy/sympy/pull/1407#issuecomment-7617497 -- You

Re: [sympy] Kinetic and potential energy functionality. (#1407)

2012-08-09 Thread Ondřej Čertík
m*r*v*N.z return self.point.pos_from(point) ^ (self.mass * self.point.vel(frame)) + +def kinetic_energy(self, frame): +Kinetic energy of the particle + +The kinetic energy, T, of a particle,P, is given by + +T = 0.5 * m *

Re: [sympy] Kinetic and potential energy functionality. (#1407)

2012-08-09 Thread Ondřej Čertík
@angadhn, there are several warnings, see my log here: https://gist.github.com/3305562, and no warnings in master. Do: ``` cd doc make html ``` and let me know if you can reproduce my log. Then the next step will be to fix the warnings. --- Reply to this email directly or view it on GitHub:

Re: [sympy] LagrangesMethod class for sympy.physics.mechanics. (#1460)

2012-08-08 Thread Ondřej Čertík
You still have a trailing whitespace in `lagrange.py` line 49, see the Travis test results: ``` AssertionError: File contains trailing whitespace: /home/vagrant/virtualenv/python2.6/lib/python2.6/site-packages/sympy/physics/mechanics/lagrange.py, line 49. ``` --- Reply to this email directly

Re: [sympy] Kinetic and potential energy functionality. (#1407)

2012-08-08 Thread Ondřej Čertík
@angadhn, did you see my comment about rebasing? See also: https://groups.google.com/d/topic/sympy/T2NfDo17wqc/discussion Please stop rebasing, just keep pushing new patches in. You still didn't address the points, that I mentioned: https://github.com/sympy/sympy/pull/1407/files#r1306927

Re: [sympy] Autorat (#1470)

2012-08-08 Thread Ondřej Čertík
There is currently a big bug: ``` In [1]: e = 1e-100 In [2]: e Out[2]: 0 ``` The reason being (by looking into ipython history): ``` In [1]: e =Integer (1e-100 ) In [2]: e

Re: [sympy] Autorat (#1470)

2012-08-08 Thread Ondřej Čertík
@@ -0,0 +1,14 @@ +import sys + +from sympy.interactive.session import int_to_Integer + +def test_int_to_Integer(): +assert int_to_Integer(1 + 2.2 + 0x3 + 40) == \ +'Integer (1 )+2.2 +Integer (0x3 )+Integer (40 )' +if sys.version_info[0] == 2: +assert

Re: [sympy-bot] Summary (#123)

2012-08-08 Thread Ondřej Čertík
Yep, looks great to me. --- Reply to this email directly or view it on GitHub: https://github.com/sympy/sympy-bot/pull/123#issuecomment-7601235 -- You received this message because you are subscribed to the Google Groups sympy-patches group. To post to this group, send email to

Re: [sympy] Diagram Drawing (#1430)

2012-08-07 Thread Ondřej Čertík
@ness01, thanks! --- Reply to this email directly or view it on GitHub: https://github.com/sympy/sympy/pull/1430#issuecomment-7563450 -- You received this message because you are subscribed to the Google Groups sympy-patches group. To post to this group, send email to

Re: [sympy] Autorat (#1470)

2012-08-07 Thread Ondřej Čertík
+from tokenize import generate_tokens, untokenize, NUMBER, NAME, OP +from StringIO import StringIO + +result = [] +g = generate_tokens(StringIO(s).readline) # tokenize the string +for toknum, tokval, _, _, _ in g: +if toknum == NUMBER and '.' not in tokval: #

Re: [sympy] Autorat (#1470)

2012-08-07 Thread Ondřej Čertík
+# Check the cell for syntax errors. This way, the syntax error +# will show the original input, not the transformed input. The +# downside here is that IPython magic like %timeit will not work +# with transformed input (but on the other hand,

Re: [sympy] Autorat (#1470)

2012-08-07 Thread Ondřej Čertík
+Example +=== + + from sympy.interactive.session import int_to_Integer + from sympy import Integer + s = '1.2 + 1/2 - 0x12 + a1' + int_to_Integer(s) +'1.2 +Integer (1 )/Integer (2 )-Integer (0x12 )+a1 ' + s = 'print (1/2)' + int_to_Integer(s) +

Re: [sympy] Diagram Layout (#1429)

2012-08-07 Thread Ondřej Čertík
But otherwise great job on the patch. --- Reply to this email directly or view it on GitHub: https://github.com/sympy/sympy/pull/1429#issuecomment-7571681 -- You received this message because you are subscribed to the Google Groups sympy-patches group. To post to this group, send email to

Re: [sympy] Kinetic and potential energy functionality. (#1407)

2012-08-07 Thread Ondřej Čertík
@angadhn, can you please address all Aaron's and Jason's comments above? E.g. things about the isinstance as well as the +=. Then we can merge it. --- Reply to this email directly or view it on GitHub: https://github.com/sympy/sympy/pull/1407#issuecomment-7571749 -- You received this message

Re: [sympy] LagrangesMethod class for sympy.physics.mechanics. (#1460)

2012-08-07 Thread Ondřej Čertík
+below_eye = zeros(n+m,n) +A = (self.mass_matrix).col_join((self._m_cd).row_join(zeros(m,m))) +below_I = below_eye.row_join(A) +return I.col_join(below_I) +else: + A = row1.col_join(row2) + return A + +

Re: [sympy] LagrangesMethod class for sympy.physics.mechanics. (#1460)

2012-08-07 Thread Ondřej Čertík
+# of the string fixed frame is redefined as 'LagrangesMethod' doesn't require +# generalized speeds, per se. (Lagrangian mechanics requires 'simple' +# generalized speeds) +A.orientnew('A', 'Axis', [q, N.z]) +A.set_ang_vel(N, qd *A.z) +P.v2pt_theory(O,N,A) +T

Re: [sympy] LagrangesMethod class for sympy.physics.mechanics. (#1460)

2012-08-07 Thread Ondřej Čertík
+The system's mass matrix + +forcing : Matrix +The system's forcing vector + +mass_matrix_full : Matrix +The mass matrix for the qdot's, qdoubledot's, and the +lagrange multipliers (lam) + +forcing_full : Matrix +The forcing vector for

Re: [sympy] LagrangesMethod class for sympy.physics.mechanics. (#1460)

2012-08-07 Thread Ondřej Čertík
You seem to have some trailing whitespace problems there: http://travis-ci.org/#!/sympy/sympy/jobs/2056371 --- Reply to this email directly or view it on GitHub: https://github.com/sympy/sympy/pull/1460#issuecomment-7571865 -- You received this message because you are subscribed to the Google

Re: [sympy] Kinetic and potential energy functionality. (#1407)

2012-08-07 Thread Ondřej Čertík
First one note for any PR just keep adding patches to your branch, so that we can quickly see what has changed and one can read the whole PR as a history or story. If you rebase, then suddenly all the test results stop having any sense. Only at the very end, when the PR is ready to go in,

Re: [sympy] Kinetic and potential energy functionality. (#1407)

2012-08-07 Thread Ondřej Čertík
for e in bodylist: if isinstance(e, (RigidBody, Particle)): -lm_individual = e.linearmomentum(frame) -linearmomentum_sys = linearmomentum_sys + lm_individual +lm_individual = e.linear_momentum(frame) +

Re: [sympy] Kinetic and potential energy functionality. (#1407)

2012-08-07 Thread Ondřej Čertík
10*N.x + 500*N.y +bodylist = list(bodylist) if not isinstance(bodylist, list): @angadhn, this comment still applies I think. --- Reply to this email directly or view it on GitHub: https://github.com/sympy/sympy/pull/1407/files#r1328300 -- You received this message

Re: [sympy] Kinetic and potential energy functionality. (#1407)

2012-08-07 Thread Ondřej Čertík
+ from sympy.physics.mechanics import Point, Particle, ReferenceFrame + from sympy.physics.mechanics import RigidBody, outer, potential_energy + from sympy import symbols + M, m, g, h = symbols('M m g h') + N = ReferenceFrame('N') + O = Point('O') +

Re: [sympy] Autorat (#1470)

2012-08-07 Thread Ondřej Čertík
+from tokenize import generate_tokens, untokenize, NUMBER, NAME, OP +from StringIO import StringIO + +result = [] +g = generate_tokens(StringIO(s).readline) # tokenize the string +for toknum, tokval, _, _, _ in g: +if toknum == NUMBER and '.' not in tokval: #

Re: [sympy] Kinetic and potential energy functionality. (#1407)

2012-08-07 Thread Ondřej Čertík
Looks like you rebased again... --- Reply to this email directly or view it on GitHub: https://github.com/sympy/sympy/pull/1407#issuecomment-7572129 -- You received this message because you are subscribed to the Google Groups sympy-patches group. To post to this group, send email to

Re: [sympy] Lazy orthogonal polynomials (#1457)

2012-08-06 Thread Ondřej Čertík
Ha, nice! Awesome work, thanks. From quick look it looks excellent. I will give it a thorough review soon. --- Reply to this email directly or view it on GitHub: https://github.com/sympy/sympy/pull/1457#issuecomment-7536947 -- You received this message because you are subscribed to the Google

Re: Working on the logic module

2012-07-27 Thread Ondřej Čertík
Hi Alex, I would suggest you to just use the sympy mailinglist, we don't use the sympy-patches anymore. Alternatively, just open a pull request with your code and ask for comments. Ondrej On Thu, Jul 26, 2012 at 5:06 PM, alkant alex.kantchel...@gmail.com wrote: Hi folks, As suggested in

[sympy] Test pull request for sympy-bot (#1403)

2012-07-03 Thread Ondřej Čertík
DO NOT MERGE This is for testing the pull request at sympy-bot: https://github.com/sympy/sympy-bot/pull/113 We need to check that it popped up here: http://repos.sympy.org/ (a testing url of the sympy-bot web app) You can merge this Pull Request by running: git pull

[sympy] test_sets: Fixes the test failure (#1398)

2012-07-02 Thread Ondřej Čertík
The left hand side is equal to set([S(2), S(3)]), and that is not equal to set([2, 3]). So this patch fixes the right hand side. This fixes the test failure introduced by #1394. You can merge this Pull Request by running: git pull https://github.com/certik/sympy set_fix Or you can view,

[sympy] physics/matrices.py: fix whitespace formatting (#1384)

2012-06-24 Thread Ondřej Čertík
This patch adds space around the == and = operators. Just a simple patch, I just want to try out the new pull request testing... :) You can merge this Pull Request by running: git pull https://github.com/certik/sympy code Or you can view, comment on it, or merge it online at:

[sympy] Skip failing doctests (#1382)

2012-06-23 Thread Ondřej Čertík
These doctest are platform dependent, so we simply skip testing them. This problem was introduced by the pull request #1371. You can merge this Pull Request by running: git pull https://github.com/certik/sympy sets Or you can view, comment on it, or merge it online at:

[sympy-bot] Retry if there is a problem at the server (#111)

2012-06-21 Thread Ondřej Čertík
Fixes #110 You can merge this Pull Request by running: git pull https://github.com/certik/sympy-bot task_url Or you can view, comment on it, or merge it online at: https://github.com/sympy/sympy-bot/pull/111 -- Commit Summary -- * Retry if there is a problem at the server -- File

[sympy] Run doctests in Travis CI as well (#1373)

2012-06-21 Thread Ondřej Čertík
**IMPORTANT**: Only merge this *after* the pull request #1366 is in. Now both regular tests and doctests are run. The only missing tests are documentation tests. This pull request is a simple change and you can see the Travis CI results here: http://travis-ci.org/#!/certik/sympy/builds/1676447

[sympy] Add Travis CI integration (#1363)

2012-06-20 Thread Ondřej Čertík
This adds a simple ``.travis.yml`` script which makes SymPy repository automatically work with http://travis-ci.org/ continuous integration. You still have to enable it at travis-ci.org for *your* repository, I enabled it for mine. Each branch with ``.travis.yml`` present will then be

[sympy] README: add links to Travis CI and sympy-bot (#1365)

2012-06-20 Thread Ondřej Čertík
You can merge this Pull Request by running: git pull https://github.com/certik/sympy travis-ci Or you can view, comment on it, or merge it online at: https://github.com/sympy/sympy/pull/1365 -- Commit Summary -- * README: add links to Travis CI and sympy-bot -- File Changes -- M

[sympy-bot] KeyError: 'task_url' (#110)

2012-06-20 Thread Ondřej Čertík
Right now, the sympy-bot is broken, at the end it says: ``` View log at: /tmp/sympy-bot-tmp0M_3tb/out/log Uploading test results Traceback (most recent call last): File /home/ondrej/usr/bin/sympy-bot, line 359, in module main() File /home/ondrej/usr/bin/sympy-bot, line 141, in main