[sympycore] r1216 committed - Added to_ADD to POW head

0 views
Skip to first unread message

codesite...@google.com

unread,
Oct 17, 2011, 3:34:01 AM10/17/11
to sympycor...@googlegroups.com
Revision: 1216
Author: pearu.peterson
Date: Mon Oct 17 00:33:04 2011
Log: Added to_ADD to POW head
http://code.google.com/p/sympycore/source/detail?r=1216

Modified:
/trunk/sympycore/heads/pow.py

=======================================
--- /trunk/sympycore/heads/pow.py Thu Aug 27 14:00:02 2009
+++ /trunk/sympycore/heads/pow.py Mon Oct 17 00:33:04 2011
@@ -113,6 +113,9 @@
s2 = '('+e+')' if e_p < pow_p else e
return s1 + '**' + s2, pow_p

+ def to_ADD(self, Algebra, (base, exp), expr):
+ return Algebra(ADD, [expr])
+
def to_EXP_COEFF_DICT(self, cls, (base, exp), expr, variables=None):
if isinstance(exp, Expr):
if exp.head is NUMBER:

Reply all
Reply to author
Forward
0 new messages