Skip to content

Commit d216c0f

Browse files
authored
shortened creation of monomials dict
1 parent 562f7f8 commit d216c0f

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

src/sage/schemes/riemann_surfaces/riemann_surface.py

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1962,10 +1962,7 @@ def is_hyperelliptic(self):
19621962
for j in range(i, self.genus)]
19631963

19641964
# Find the monomials present and their coefficients
1965-
mons = []
1966-
for p in pairs:
1967-
mons += p.monomials()
1968-
mons = list(set(mons))
1965+
mons = {mon for p in pairs for mon in p.monomials()}
19691966
CM = Matrix([[p.monomial_coefficient(mon) for p in pairs]
19701967
for mon in mons])
19711968
# test the number of linearly independent pairs

0 commit comments

Comments
 (0)