On Sat, Sep 18, 2010 at 8:54 PM, Nicholas Kinar <n.ki...@usask.ca> wrote: >> >>>> u = Dummy('u') > > > I can't seem to use the u = Dummy('u') variable, since I now receive the > following error: > > Traceback (most recent call last): > File "test.py", line 12, in <module> > u = Dummy('u') > NameError: name 'Dummy' is not defined
I think that you need to use: In [1]: a = Symbol("x", dummy=True) > > Moreover, I think that something like this would be extremely useful as a > function incorporated into the sympy distribution: >>>> >>>> collect(expr2.subs([(a**(n+1), u*a**(n+1)) for a in _]), u) If you have time, send us a patch for this please. Btw --- you should not be using "from sympy import *", but rather use explicit imports, then it would be clear where things are coming from and also Python can guide you more when some imports change. Ondrej -- You received this message because you are subscribed to the Google Groups "sympy" group. To post to this group, send email to sy...@googlegroups.com. To unsubscribe from this group, send email to sympy+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/sympy?hl=en.