[GitHub] A more gentle deprecation of Symbol('x', dummy=True) [sympy/sympy GH-118]

2011-03-02 Thread jegerjensen
Until yesterday the recommended way to use the Dummy class was with Symbol('x', dummy=True). While I agree that the new syntax is better, we should take a more cautious approach in removing the old syntax. According to git blame, it has been described in the user guide since 2008 and Dummy

[GitHub] Various codeprinting fixes [sympy/sympy GH-116]

2011-03-01 Thread jegerjensen
While using the code printing framework I have discovered a couple of nuisances, and I've collected fixes in this branch. Most patches are small and contain rather trivial changes. https://github.com/sympy/sympy/pull/116 -- You received this message because you are subscribed to the Google

Re: Created codegenerator FCodeGen for generating compilable fortran code

2010-06-09 Thread jegerjensen
The above code is also available at http://github.com/jegerjensen/sympy/tree/fortran_codegen (all patches) and http://github.com/jegerjensen/sympy/tree/fortran_free_form2 (For just the 3 first patches) -- You received this message because you are subscribed to the Google Groups sympy-patches

Re: Created codegenerator FCodeGen for generating compilable fortran code

2010-06-09 Thread jegerjensen
Sorry, I didn't know about the tests under doc/. I fixed it in the second patch, and created new branches at github: http://github.com/jegerjensen/sympy/tree/fortran_codegen2 and http://github.com/jegerjensen/sympy/tree/fortran_free_form3 . -- You received this message because you

Re: Fix issue 1920: SymTuple doesn't rebuild itself

2010-05-01 Thread jegerjensen
ronan.l...@gmail.com wrote: Le vendredi 30 avril 2010 à 14:23 -0700, Ondrej Certik a écrit : On Fri, Apr 30, 2010 at 6:26 AM, jegerjensen jensen.oyv...@gmail.com wrote: Also, shouldn't this go into sympy.core? Ondrej That is probably a good idea.  Where should we put the decorator

Re: Fix issue 1920: SymTuple doesn't rebuild itself

2010-05-01 Thread jegerjensen
On 1 Mai, 15:22, Øyvind Jensen jensen.oyv...@gmail.com wrote: SymTuple did not fulfill foo.func(*foo.args) == foo.  This patch fixes that by treating the constructor *args as items of the tuple, rather than expecting exactly one tuple argument. Added docstring, doctest and test  +  fixed some

Re: Fix for Issue 1920: Now SymTuple.func(*SymTuple.args) work as expected.

2010-04-30 Thread jegerjensen
Thanks for your comments. I created another patch, which by accident ended up in a new thread. Lets continue this discussion there. Øyvind -- You received this message because you are subscribed to the Google Groups sympy-patches group. To post to this group, send email to

Re: Fix issue 1920: SymTuple doesn't rebuild itself

2010-04-30 Thread jegerjensen
The above patch was my response to Ondrejs comment: Well, I am not sure that the change from: -assert st == SymTuple((1,2,3,4)) to: +assert st == SymTuple(1, 2, 3, 4) is a good idea. In fact I think it's a bad idea, as we migrated from Matrix(1,2, 3, 4) syntax to Matrix([1, 2, 3, 4]).

Re: Added method Dummy.as_nondummy()

2010-04-05 Thread jegerjensen
All right, lets drop it, no big deal. Øyvind On 5 apr, 19:25, Ondrej Certik ond...@certik.cz wrote: On Sun, Apr 4, 2010 at 11:34 PM, Øyvind Jensen jensen.oyv...@gmail.com wrote: Well,  I think it can be useful, especially since the commutative property is lost if you do s =

Re: Fix for Symbol.as_dummy() loosing commutative property

2010-04-01 Thread jegerjensen
On 31 Mar, 22:45, Aaron S. Meurer asmeu...@gmail.com wrote: On Mar 31, 2010, at 2:38 PM, Vinzent Steinberg wrote: 2010/3/31 jegerjensen jensen.oyv...@gmail.com: On 31 Mar, 21:50, Vinzent Steinberg vinzent.steinb...@googlemail.com wrote: I'm not sure whether as_dummy() is really

Re: Added method Dummy.as_nondummy()

2010-03-31 Thread jegerjensen
I also put these patches on github/fix_dummy cheers! Øyvind On 31 Mar, 12:56, Øyvind Jensen jensen.oyv...@gmail.com wrote: In situations where it is natural to generate dummy symbols with Symbol.as_dummy(), the reverse process may also be useful. Uncommented two tests for this. ---  

Re: Fix for Symbol.as_dummy() loosing commutative property

2010-03-31 Thread jegerjensen
On 31 Mar, 21:50, Vinzent Steinberg vinzent.steinb...@googlemail.com wrote: I'm not sure whether as_dummy() is really useful. I think of it as akin to the way you would use prime in hand writing, like using x' as an integration variable for a function of x. Shouldn't just passing the

Re: Fix Basic.__lt__() and friends for noncommutative symbols (issue 1878)

2010-03-28 Thread jegerjensen
Ooops! it turns out I actually got a failing doctest in secondquant.py... Sorry about that. This was because of a comparison ab that should have used cmp(), and the fix is obvious. Two patches are now uploaded on github in the branch fix__lt__ http://github.com/jegerjensen/sympy/tree/fix__lt__

Re: Make substitute_dummies() more flexible and controllable w.r.t. output

2010-02-27 Thread jegerjensen
the different behaviour of our installations, but I have a very short python path: PYTHONPATH=. Øyvind Aaron Meurer On Feb 27, 2010, at 1:33 PM, jegerjensen wrote: It is the same. What do you get from grep?  I don't see any raise of that exception... [...@ubuntulaptop sympy (fix_wicks2)]$ grep

Re: Second quantization with fermionic operators

2009-11-17 Thread jegerjensen
) + KroneckerDelta(_i, _r)*KroneckerDelta(_p, _r) = tests finished: 341 passed, 1 failed in 6.34 seconds = So this has to be fixed. Rebased patches are in my wick3 branch at github. Let's get these patches in. Ondrej On Sun, Oct 18, 2009 at 2:09 PM, jegerjensen

Re: Second quantization with fermionic operators

2009-10-18 Thread jegerjensen
:58 AM, jegerjensen jensen.oyv...@gmail.com wrote:         I implemented lots of doctests, and pushed to my new github         account:         git://github.com/jegerjensen/sympy.git         There is still some doctests missing, but I think all the         important

Re: Second quantization with fermionic operators

2009-10-18 Thread jegerjensen
And another push... I overlooked the substitution Wicks - wicks. Øyvind On 18 Okt, 22:51, jegerjensen jensen.oyv...@gmail.com wrote: I just pushed some of the trivial fixes to github, please pull. Ondrej, I fixed the 'str' variable as well. Øyvind On 15 Okt, 18:54, Brian Granger

Re: Second quantization with fermionic operators

2009-10-13 Thread jegerjensen
I implemented lots of doctests, and pushed to my new github account: git://github.com/jegerjensen/sympy.git There is still some doctests missing, but I think all the important stuff is covered. Øyvind --~--~-~--~~~---~--~~ You received this message because you

Re: Second quantization with fermionic operators

2009-10-08 Thread jegerjensen
Ooops! I have to correct myself: The reason I chose the sparse format for the Fermionic case was not because of storage considerations. Rather because I wanted to treat problems without depending on the number of particles and the size of the model space.  I believe the framework will be

Re: Second quantization with fermionic operators

2009-10-07 Thread jegerjensen
For what is worth, I also wrote a wick expansion in sympy, see my wick branch at github: http://github.com/certik/sympy/tree/wick if you run the t.py script in the root directory, it will save all the feynman diagrams to /tmp as png images. It only works for scalar bosons. Your wicks

Re: Second quantization with fermionic operators

2009-10-06 Thread jegerjensen
Thanks, it sure is great to see your enthusiasm :-) It turned out I have made two small changes elsewhere in the code, so I made a total of 4 patches, and I will try to send them in now. About using the Coupled Cluster example as a unit test: On my laptop (from 2005) it takes about 2-3

Second quantization with fermionic operators

2009-10-05 Thread jegerjensen
Hi all, I have implemented a framework for working with fermionic second quantization operators with Sympy and I'd like to submit patches for incorporation in the project. I have tried to reuse the existing Bosonic framework when applicable, and have ended up with code that reproduces a lot of