Skip to content

Commit 3dc4ac3

Browse files
authored
Update homology_group.py
undo one little change
1 parent c9a825a commit 3dc4ac3

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/sage/homology/homology_group.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -114,13 +114,13 @@ def _latex_(self):
114114
eldv = self._original_invts
115115
if len(eldv) == 0:
116116
return "0"
117-
rank = len([1 for x in eldv if x == 0])
117+
rank = len([x for x in eldv if x == 0])
118118
torsion = sorted(x for x in eldv if x)
119119
if rank > 4:
120120
g = ["\\ZZ^{{{}}}".format(rank)]
121121
else:
122122
g = ["\\ZZ"] * rank
123-
if len(torsion) != 0:
123+
if torsion:
124124
printed = []
125125
for t in torsion:
126126
numfac = torsion.count(t)

0 commit comments

Comments
 (0)