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
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
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
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
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
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
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
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
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.
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
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
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
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
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
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
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
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
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
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
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
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]: (
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
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
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
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
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
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
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
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
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
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
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
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=
33 matches
Mail list logo