On Thu, Jun 19, 2008 at 3:14 AM, Roberto Nobrega <[EMAIL PROTECTED]> wrote: > While checking SymPy wiki's tutorial about pattern matching, I ended up with > the following: > >>>> from sympy import * >>>> x = Symbol('x') >>>> p = Wild('p') >>>> q = Wild('q') >>>> (5*x**2 + 3*x).match(p*x**2 + q*x) > > I got the following result, > {q_: 5*x, p_: 3/x}
I got the following result: In [1]: p = Wild('p') In [2]: q = Wild('q') In [3]: (5*x**2 + 3*x).match(p*x**2 + q*x) Out[3]: {q: 3, p: 5} Which sympy version do you have? In general, sympy should behave like mathematica/maple in this imho. Ondrej --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "sympy" group. To post to this group, send email to sympy@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/sympy?hl=en -~----------~----~----~----~------~----~------~--~---