Skip to content

Commit 9f68b47

Browse files
committed
made ordering of coefficient in coefficient_matrix decreasing for univariate polynomial ring
1 parent 3dd953c commit 9f68b47

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/sage/rings/polynomial/toy_variety.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,10 @@ def coefficient_matrix(polys):
120120
M = matrix(R, len(polys), len(mons))
121121
for i in range(len(polys)):
122122
imons = polys[i].monomials()
123-
icoeffs = polys[i].coefficients()
123+
if polys[0].parent().ngens() == 1:
124+
icoeffs = polys[i].coefficients()[::-1]
125+
else:
126+
icoeffs = polys[i].coefficients()
124127
for j in range(len(imons)):
125128
M[i, mons.index(imons[j])] = icoeffs[j]
126129
return M

0 commit comments

Comments
 (0)