This is for the same reason mentioned earlier. f(*args, kwarg=value) syntax isn't supported until Python 2.6 or greater. The solution is to use Poly(dict(FGH), *gens, **{domain:'QQ'}) (or update to Python 2.6).
Aaron Meurer On Apr 18, 2010, at 5:24 PM, Ben Goodrich wrote: > Hi Mateusz, > > On Apr 18, 6:48 pm, Mateusz Paprocki <matt...@gmail.com> wrote: >> Hi, >> >>> fgh = Poly(dict(FGH), domain = 'QQ', *gens) >> >> the above should read >> >> Poly(dict(FGH), *gens, domain='ZZ') >> >> (or domain='QQ' if you used the rational field in previous steps). > > I tried that way previously, but it results in an error > > File "<ipython console>", line 1 > fgh = Poly(dict(FGH), *gens, domain='QQ') > ^ > SyntaxError: invalid syntax > > regardless of whether domain is ZZ or QQ. If I just do > > fgh = Poly(dict(FGH), *gens) > > it works correctly, except it defaults to ZZ. > > Actually, I can't even do > > FF = sdp_from_dict(Poly(F, *gens, domain = 'QQ').as_dict(), O_lex) > > or specify any option after the *gens without getting the above syntax > error. > > I am using Python 2.5. > > Thanks, > Ben > > -- > 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. > -- 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.