| 1 | initial version |
y must belong to the base ring of the polynomial. Hence a simple fix in this case is to define T over SR rather than QQ:
y = var("y")
T = PolynomialRing(SR, 'x')
f = T.lagrange_polynomial([(0,y),(2,2)])
print(f)
Copyright Sage, 2010. Some rights reserved under creative commons license. Content on this site is licensed under a Creative Commons Attribution Share Alike 3.0 license.