Skip to content

Commit 6f4baf9

Browse files
committed
cast roots back to original ring
1 parent e52dcb9 commit 6f4baf9

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

src/sage/rings/finite_rings/integer_mod_ring.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1944,7 +1944,12 @@ def _roots_univariate_polynomial(self, f, ring=None, multiplicities=True, algori
19441944

19451945
# Finite fields are a base case
19461946
if self.is_field():
1947-
return f.change_ring(f.base_ring().field()).roots(multiplicities=False)
1947+
return list(
1948+
map(
1949+
f.base_ring(),
1950+
f.change_ring(f.base_ring().field()).roots(multiplicities=False),
1951+
)
1952+
)
19481953

19491954
# Otherwise, find roots modulo each prime power
19501955
fac = self.factored_order()

0 commit comments

Comments
 (0)