* ObsessiveMathsFreak <[email protected]> [2012-02-08 15:29:03 -0800]: > Currently the code for obtaining the coefficients of a multivariate > polynomials returns only a list of coefficients without returning the > degrees as well. For example > > f(x,y)=10*x^2*y+3*x > B=f(x,y).polynomial(SR) > print B.coefficients() > [10, 3] > > Is there no way of getting sage to give back the degree's of the > corresponding multivariate polynomials as well. You can use dict() for that. As in
sage: R.<x,y> = SR[]
sage: f=10*x^2*y+3*x
sage: f.dict()
{(1, 0): 3, (2, 1): 10}
cheers,
julian
pgpf0gLgQa6gt.pgp
Description: PGP signature
