Hi,
I was trying to convert expressions to polynomials and back
This works:
R.<X,Y> = PolynomialRing(QQ,2,'XY')
print R( (x+y^2).subs({x:X,y:Y}) )
and I can e.g. use methods as monomials() etc.
However I would like to use SR - as the coeffs might have some symbols:
R.<X,Y> = PolynomialRing(SR,2,'XY')
print R( X+Y^2 )
print R( (x+y^2).subs({x:X,y:Y}) )
The last line throws:
TypeError: no canonical coercion from Multivariate Polynomial Ring in X,
Y over Symbolic Ring to Symbolic Ring
My question is: how to make an multivariate polynomial from symbolic
expression ?
the best
Marcin
--
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/sage-support
URL: http://www.sagemath.org