Re: Issue 1261 in sympy: incorrect exponentiation with non-commutative symbols

2010-04-19 Thread sympy
Updates: Status: Fixed Comment #32 on issue 1261 by Vinzent.Steinberg: incorrect exponentiation with non-commutative symbols http://code.google.com/p/sympy/issues/detail?id=1261 If fixed the patch to use 'is' and pushed it in. For the fixing a new issue should be opened. It might ma

Re: Issue 1261 in sympy: incorrect exponentiation with non-commutative symbols

2010-04-19 Thread sympy
Comment #31 on issue 1261 by mattpap: incorrect exponentiation with non-commutative symbols http://code.google.com/p/sympy/issues/detail?id=1261 This is a reason for having singleton objects (S). We could use a == 1 as well, but guess what would be the implications. If [2] is used in heavy

Re: Issue 1261 in sympy: incorrect exponentiation with non-commutative symbols

2010-04-19 Thread sympy
Comment #30 on issue 1261 by asmeurer: incorrect exponentiation with non-commutative symbols http://code.google.com/p/sympy/issues/detail?id=1261 Indeed, 10x faster: In [1]: a = S(1) In [2]: %timeit a == S.One 100 loops, best of 3: 4.21 us per loop In [3]: %timeit a is S.One 100 lo

Re: Issue 1261 in sympy: incorrect exponentiation with non-commutative symbols

2010-04-19 Thread sympy
Updates: Labels: -NeedsReview PassedReview Comment #29 on issue 1261 by Vinzent.Steinberg: incorrect exponentiation with non-commutative symbols http://code.google.com/p/sympy/issues/detail?id=1261 Thank you, the patch looks fine, it fixes the problem and all tests pass. +1 Would it

Re: Issue 1261 in sympy: incorrect exponentiation with non-commutative symbols

2010-04-19 Thread sympy
Updates: Labels: -NeedsBetterPatch NeedsReview Comment #28 on issue 1261 by asmeurer: incorrect exponentiation with non-commutative symbols http://code.google.com/p/sympy/issues/detail?id=1261 (No comment was entered for this change.) -- You received this message because you are list

Re: Issue 1261 in sympy: incorrect exponentiation with non-commutative symbols

2010-04-19 Thread sympy
Comment #27 on issue 1261 by alberthilbert: incorrect exponentiation with non-commutative symbols http://code.google.com/p/sympy/issues/detail?id=1261 The following patch should solve that problem. Raffaele Attachments: 0001-Fix-evaluation-of-power-with-noncommutative-Mul-as-b.patc

Re: Issue 1261 in sympy: incorrect exponentiation with non-commutative symbols

2010-04-19 Thread sympy
Comment #26 on issue 1261 by asmeurer: incorrect exponentiation with non-commutative symbols http://code.google.com/p/sympy/issues/detail?id=1261 Issue 1904 has been merged into this issue. -- You received this message because you are listed in the owner or CC fields of this issue, or becaus

Re: Issue 1261 in sympy: incorrect exponentiation with non-commutative symbols

2010-03-09 Thread sympy
Comment #25 on issue 1261 by asmeurer: incorrect exponentiation with non-commutative symbols http://code.google.com/p/sympy/issues/detail?id=1261 That looks like it is just a printing issue. -- You received this message because you are listed in the owner or CC fields of this issue, or becau

Re: Issue 1261 in sympy: incorrect exponentiation with non-commutative symbols

2010-03-08 Thread sympy
Comment #24 on issue 1261 by smichr: incorrect exponentiation with non-commutative symbols http://code.google.com/p/sympy/issues/detail?id=1261 I mean (x*y*x*y)**-1 -- You received this message because you are listed in the owner or CC fields of this issue, or because you starred this issue.

Re: Issue 1261 in sympy: incorrect exponentiation with non-commutative symbols

2010-03-08 Thread sympy
Comment #23 on issue 1261 by smichr: incorrect exponentiation with non-commutative symbols http://code.google.com/p/sympy/issues/detail?id=1261 ok, I see what it does, but is this right? x,y=symbols('xy', commutative=0) (x*y)**-2 1/(y**2*x**2) I would have thought (x*y*x*y)**-2 -- You r

Re: Issue 1261 in sympy: incorrect exponentiation with non-commutative symbols

2010-03-08 Thread sympy
Comment #22 on issue 1261 by smichr: incorrect exponentiation with non-commutative symbols http://code.google.com/p/sympy/issues/detail?id=1261 Can someone give me an example of what the l.reverse() is suppose to be doing when e is negative? -- You received this message because you are li

Re: Issue 1261 in sympy: incorrect exponentiation with non-commutative symbols

2010-03-08 Thread sympy
Comment #21 on issue 1261 by asmeurer: incorrect exponentiation with non-commutative symbols http://code.google.com/p/sympy/issues/detail?id=1261 I agree. We should just leave (x*y)**n unexpanded by default for non-comutative x, y and make expand((x*y)**n) expand it to x*y*x*y…x*y (n time

Re: Issue 1261 in sympy: incorrect exponentiation with non-commutative symbols

2009-12-11 Thread sympy
Comment #20 on issue 1261 by ronan.l...@gmail.com: incorrect exponentiation with non-commutative symbols http://code.google.com/p/sympy/issues/detail?id=1261 Even without considering the failing test, I'm -1 on your patch. [Mul(*rest) for ind in range(e)] is unacceptable, because e could very w

Re: Issue 1261 in sympy: incorrect exponentiation with non-commutative symbols

2009-12-11 Thread sympy
Comment #19 on issue 1261 by wflynny: incorrect exponentiation with non-commutative symbols http://code.google.com/p/sympy/issues/detail?id=1261 This most likely stems from the line if e.is_negative: l=l.reverse() because in the cursory patch I offered, l.reverse() is the same as l so that li

Re: Issue 1261 in sympy: incorrect exponentiation with non-commutative symbols

2009-12-11 Thread sympy
Updates: Labels: NeedsBetterPatch Comment #18 on issue 1261 by asmeurer: incorrect exponentiation with non-commutative symbols http://code.google.com/p/sympy/issues/detail?id=1261 The ODE fail is a strange one: Old: In [12]: dsolve(Eq(x*f(x).diff(x) + f(x) - f(x)**2,0), f(x), "Bernoulli

Re: Issue 1261 in sympy: incorrect exponentiation with non-commutative symbols

2009-12-11 Thread sympy
Comment #17 on issue 1261 by wflynny: incorrect exponentiation with non-commutative symbols http://code.google.com/p/sympy/issues/detail?id=1261 I hadn't even made a patch but here is one that implements the fix. Hopefully I remember how to make patches correctly. It was just an impulse fix

Re: Issue 1261 in sympy: incorrect exponentiation with non-commutative symbols

2009-12-11 Thread sympy
Comment #16 on issue 1261 by Vinzent.Steinberg: incorrect exponentiation with non-commutative symbols http://code.google.com/p/sympy/issues/detail?id=1261 wyflynny, is your patch posted for review? -- You received this message because you are listed in the owner or CC fields of this issue, or

Re: Issue 1261 in sympy: incorrect exponentiation with non-commutative symbols

2009-12-10 Thread sympy
Comment #15 on issue 1261 by wflynny: incorrect exponentiation with non-commutative symbols http://code.google.com/p/sympy/issues/detail?id=1261 True, sorry about that. Forgot I added that line in my main working copy. -- You received this message because you are listed in the owner or CC fiel

Re: Issue 1261 in sympy: incorrect exponentiation with non-commutative symbols

2009-12-10 Thread sympy
Updates: Cc: Ronan.Lamy Comment #14 on issue 1261 by ronan.l...@gmail.com: incorrect exponentiation with non-commutative symbols http://code.google.com/p/sympy/issues/detail?id=1261 Issue 1737 has been merged into this issue. -- You received this message because you are listed in the o

Re: Issue 1261 in sympy: incorrect exponentiation with non-commutative symbols

2009-12-10 Thread sympy
Updates: Labels: -EasyToFix Comment #13 on issue 1261 by ronan.l...@gmail.com: incorrect exponentiation with non-commutative symbols http://code.google.com/p/sympy/issues/detail?id=1261 No, this hasn't been fixed. The results you just posted aren't in master. It looks like you've impl

Re: Issue 1261 in sympy: incorrect exponentiation with non-commutative symbols

2009-12-10 Thread sympy
Comment #12 on issue 1261 by wflynny: incorrect exponentiation with non-commutative symbols http://code.google.com/p/sympy/issues/detail?id=1261 Has this issue been fixed since issue 1358 got fixed? In [3]: x=s.Symbol('x',commutative=False) In [4]: y=s.Symbol('y',commutative=False) In [5]: (

Issue 1261 in sympy: incorrect exponentiation with non-commutative symbols

2009-07-07 Thread codesite-noreply
Updates: Owner: --- Comment #11 on issue 1261 by ondrej.certik: incorrect exponentiation with non-commutative symbols http://code.google.com/p/sympy/issues/detail?id=1261 I agree. We should totally refactor it out of Mul I guess. -- You received this message because you are listed in

Issue 1261 in sympy: incorrect exponentiation with non-commutative symbols

2009-07-07 Thread codesite-noreply
Comment #10 on issue 1261 by asmeurer: incorrect exponentiation with non-commutative symbols http://code.google.com/p/sympy/issues/detail?id=1261 Non-commutative stuff in SymPy is a mess, as this issue highlights. If is_commutative is going soon, I think we should wait until then to fix thi

Issue 1261 in sympy: incorrect exponentiation with non-commutative symbols

2009-07-07 Thread codesite-noreply
Updates: Labels: -NeedsReview Comment #9 on issue 1261 by ondrej.certik: incorrect exponentiation with non-commutative symbols http://code.google.com/p/sympy/issues/detail?id=1261 More work on this patch is needed. -- You received this message because you are listed in the owner or CC

Issue 1261 in sympy: incorrect exponentiation with non-commutative symbols

2009-06-11 Thread codesite-noreply
Comment #8 on issue 1261 by ondrej.certik: incorrect exponentiation with non-commutative symbols http://code.google.com/p/sympy/issues/detail?id=1261 I think we should always import the all from utilities, but we should improve utilities, to try to import "all" from python and if it fails, p

Issue 1261 in sympy: incorrect exponentiation with non-commutative symbols

2009-06-09 Thread codesite-noreply
Comment #7 on issue 1261 by asmeurer: incorrect exponentiation with non-commutative symbols http://code.google.com/p/sympy/issues/detail?id=1261 Looking in __init__.py in utilities, it looks like it imports all from there only if the version of python is below 2.5. Should I duplicate the cod

Issue 1261 in sympy: incorrect exponentiation with non-commutative symbols

2009-06-09 Thread codesite-noreply
Comment #6 on issue 1261 by asmeurer: incorrect exponentiation with non-commutative symbols http://code.google.com/p/sympy/issues/detail?id=1261 I think that I meant to put getattr(t, 'is_commutative', True). Am I guaranteed for the arguments of functions to always have the attribute is_com

Issue 1261 in sympy: incorrect exponentiation with non-commutative symbols

2009-06-08 Thread codesite-noreply
Comment #5 on issue 1261 by ondrej.certik: incorrect exponentiation with non-commutative symbols http://code.google.com/p/sympy/issues/detail?id=1261 Also note that "all" is python2.5 or newer, so you should import all from sympy/utilities/iterables so that it works everywhere. -- You recei

Issue 1261 in sympy: incorrect exponentiation with non-commutative symbols

2009-06-08 Thread codesite-noreply
Comment #4 on issue 1261 by ondrej.certik: incorrect exponentiation with non-commutative symbols http://code.google.com/p/sympy/issues/detail?id=1261 +if all(getattr(t, 'is_commutative') for t in self.args): +return True +else: +return False why not to

Issue 1261 in sympy: incorrect exponentiation with non-commutative symbols

2009-06-04 Thread codesite-noreply
Updates: Labels: EasyToFix NeedsReview Comment #3 on issue 1261 by asmeurer: incorrect exponentiation with non-commutative symbols http://code.google.com/p/sympy/issues/detail?id=1261 This also holds true for exp(x)*exp(y). powsimp cannot maintain commutativity of the arguments unle

Issue 1261 in sympy: incorrect exponentiation with non-commutative symbols

2009-01-11 Thread codesite-noreply
Updates: Labels: -Priority-Medium Priority-High Comment #2 on issue 1261 by ondrej.certik: incorrect exponentiation with non-commutative symbols http://code.google.com/p/sympy/issues/detail?id=1261 Indeed, thanks for noticing, this should be fixed. -- You received this message because

Issue 1261 in sympy: incorrect exponentiation with non-commutative symbols

2009-01-11 Thread codesite-noreply
Updates: Labels: WrongResult Comment #1 on issue 1261 by pearu.peterson: incorrect exponentiation with non-commutative symbols http://code.google.com/p/sympy/issues/detail?id=1261 (No comment was entered for this change.) -- You received this message because you are listed in the owne

Issue 1261 in sympy: incorrect exponentiation with non-commutative symbols

2009-01-11 Thread codesite-noreply
Status: Accepted Owner: pearu.peterson Labels: Type-Defect Priority-Medium New issue 1261 by pearu.peterson: incorrect exponentiation with non-commutative symbols http://code.google.com/p/sympy/issues/detail?id=1261 Note that >>> x=Symbol('x', commutative=False) >>> y=Symbol('y', commutative=