Modified:
/trunk/sympycore/heads/base.py
/trunk/sympycore/heads/term_coeff.py
=======================================
--- /trunk/sympycore/heads/base.py Mon Sep 19 13:56:01 2011
+++ /trunk/sympycore/heads/base.py Thu Oct 20 12:08:35 2011
@@ -263,7 +263,7 @@
term_coeff_dict_add_item(cls, data, lhs, 1)
return term_coeff_dict_new(cls, data)
if rhead is SYMBOL or rhead is APPLY or rhead is CALLABLE\
- or rhead is BASE_EXP_DICT or rhead is POW:
+ or rhead is BASE_EXP_DICT or rhead is POW or rhead is
SUBSCRIPT:
return cls(TERM_COEFF_DICT, {lhs:1, rhs:1})
if rhead is MUL:
return cls(ADD, [lhs, rhs])
@@ -362,7 +362,7 @@
base_exp_dict_add_item(cls, data, lhs, 1)
return base_exp_dict_new(cls, data)
if rhead is SYMBOL or rhead is CALLABLE or rhead is APPLY \
- or rhead is TERM_COEFF_DICT or rhead is ADD:
+ or rhead is TERM_COEFF_DICT or rhead is ADD or rhead is
SUBSCRIPT:
return cls(BASE_EXP_DICT, {lhs:1, rhs:1})
if rhead is EXP_COEFF_DICT:
return lhs * rhs.to(TERM_COEFF_DICT)
=======================================
--- /trunk/sympycore/heads/term_coeff.py Tue Mar 16 01:57:26 2010
+++ /trunk/sympycore/heads/term_coeff.py Thu Oct 20 12:08:35 2011
@@ -121,7 +121,7 @@
if term==rhs:
return term_coeff_new(cls, (term, coeff + 1))
return cls(TERM_COEFF_DICT,{term:coeff, rhs:1})
- if head is POW or head is APPLY or head is DIFF or head is FDIFF:
+ if head is POW or head is APPLY or head is DIFF or head is FDIFF
or head is SUBSCRIPT:
if term==rhs:
return term_coeff_new(cls, (term, coeff + 1))
return cls(TERM_COEFF_DICT,{term:coeff, rhs:1})