Hi Mateusz, On Apr 16, 4:10 pm, Mateusz Paprocki <matt...@gmail.com> wrote: > > What exactly is gens here? I thought it was supposed to be a list that > > contains all the symbols in the polynomials, but then I eventually run > > into this error > > > /tmp/mattpap-sympy-polys-cd30a32/sympy/polys/polytools.py in > > _init_poly_from_list(list_rep, *gens, **args) > > 286 > > 287 if len(gens) != 1: > > --> 288 raise PolynomialError("can't create a multivariate > > polynomial from a list") > > gens is just a list of symbols. The error tells you that you can't create > multivariate polynomials using nested lists. Use dictionaries instead. E.g.: > Poly([1,2,3], x) is ok, but not Poly([[1],[2],[3]], x, y), use Poly({(2,0): > 1, (1,0): 2, (0,0): 3}, x, y).
If gens can be a non-nested list, then maybe there is a bug in quo() ? When gens is a non-nested list, I can get all the way through your tutorial, i.e. everything through this works: fgh = basic_from_dict(dict(FGH), *gens) but I get PolynomialError("can't create a multivariate polynomial from a list") from test = quo(FGH, 1, *gens) and also if 1 is replaced with a polynomial generated from gens. 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.