From 853ed304f952f0d35a906dc860083a34fefc4f3c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20Chapoton?= Date: Sat, 15 Apr 2023 08:10:37 +0200 Subject: [PATCH] fix one bug in integer-valued polynomials --- src/sage/rings/polynomial/integer_valued_polynomials.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/sage/rings/polynomial/integer_valued_polynomials.py b/src/sage/rings/polynomial/integer_valued_polynomials.py index 3df5a101dbc..41975882cc2 100644 --- a/src/sage/rings/polynomial/integer_valued_polynomials.py +++ b/src/sage/rings/polynomial/integer_valued_polynomials.py @@ -224,10 +224,15 @@ def from_polynomial(self, p): Traceback (most recent call last): ... ValueError: not a polynomial with integer values: 1/3 + + sage: t = polygen(ZZ,'t') + sage: B = IntegerValuedPolynomialRing(QQ).B() + sage: B.from_polynomial(t+1) + B[0] + B[1] """ B = self.basis() poly = self._poly - remain = p + remain = p.change_variable_name('x') result = self.zero() while remain: N = remain.degree()