Hi, On Wednesday 05 Sep 2012, Robert Samal wrote: > Hi, > > I'm trying to compute something using multivariate polynomials, and am > struggling to understand the relation between polynomials of type <type > 'sage.rings.polynomial.multi_polynomial_libsingular.MPolynomial_libsingular > '> and of type <class > 'sage.rings.polynomial.multi_polynomial_element.MPolynomial_polydict'>. > > How does one create one or the other? And, mainly: how can one convert from > one to the other?
It shouldn't happen that you can create two polynomials of different types polydict vs. libsingular for the same ring. > What happened to me is that I unwillingly created some polynomial of one > type and some of the other and than methods like > P.coefficient(Q.monomials()[0]) object that they got argument of wrong > type. (Here P and Q are polynomials of the respective types.) If you have a ring P and and an element f in Q, doesn't P(f) work? If all else fails, there's always P(str(f)). > I'm sorry for not giving specific lines how to reproduce this, but -- in > this case this is the point ... I got my polynomials P and Q over the > course of several days and don't quite understand what happened. > > Thanks! > > Robert Cheers, Martin -- name: Martin Albrecht _pgp: http://pgp.mit.edu:11371/pks/lookup?op=get&search=0x8EF0DC99 _otr: 47F43D1A 5D68C36F 468BAEBA 640E8856 D7951CCF _www: http://martinralbrecht.wordpress.com/ _jab: [email protected] -- You received this message because you are subscribed to the Google Groups "sage-support" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. Visit this group at http://groups.google.com/group/sage-support?hl=en.
