Skip to content

Commit b5e7fbb

Browse files
user202729tscrim
andauthored
Apply suggested changes
Co-authored-by: Travis Scrimshaw <[email protected]>
1 parent b812c79 commit b5e7fbb

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

src/sage/rings/polynomial/multi_polynomial_ideal.py

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4987,10 +4987,8 @@ def reduce(self, f):
49874987
pass
49884988

49894989
gb = self.groebner_basis()
4990-
R = self.ring()
4991-
if not R.has_coerce_map_from(parent(f)):
4992-
raise TypeError(f"element belong to {parent(f)}, cannot coerce to {R}")
4993-
return R(f).reduce(gb)
4990+
f = self.ring().coerce(f)
4991+
return f.reduce(gb)
49944992

49954993
def _contains_(self, f):
49964994
r"""

0 commit comments

Comments
 (0)