Status: Accepted
Owner: smichr
Labels: Type-Defect Priority-Medium

New issue 1826 by smichr: oo matching problem
http://code.google.com/p/sympy/issues/detail?id=1826

When doing a match it seems that if some values are returned in the match
dictionary then *all* terms should appear in the dictionary. This is not
happening with the following pattern(s). In addition, a value of nan is
coming back even though it need not do so (as far as I can tell):

from sympy import *
a, b, c, p = map(Wild, 'abcp')
d=S(3)
d.match(a + b*c**p)
{c_: 3, a_: 0, b_: 1, p_: 1}

That one was ok: the parts of the pattern that don't match are 0.

But now,

d=oo
d.match(a + b*c**p)
{c_: nan, a_: oo, p_: 1} <<< b is missing
d.match(a + b)
{a_: nan, b_: oo}
d.match(a )
{a_: oo}
d.match(a + b*c)
{c_: nan, a_: oo} <<< b is missing again
d.match(b*c)
{c_: oo, b_: nan} <<< couldn't this be a 1 for b_?
d.match(b*c**p)
{c_: oo, b_: nan, p_: 1}  <<< again, just a 1 for b_?


--
You received this message because you are listed in the owner
or CC fields of this issue, or because you starred this issue.
You may adjust your issue notification preferences at:
http://code.google.com/hosting/settings

--
You received this message because you are subscribed to the Google Groups 
"sympy-issues" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/sympy-issues?hl=en.

Reply via email to