Skip to content

Commit 705606a

Browse files
committed
fixing code in filtered vector space
1 parent d059888 commit 705606a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/sage/modules/filtered_vector_space.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -377,7 +377,7 @@ def construct_from_generators_indices(generators, filtration, base_ring, check):
377377
for deg, gens in filtration.items():
378378
deg = normalize_degree(deg)
379379
gens = tuple(sorted(ZZ(i) for i in gens))
380-
if gens[0] < 0 or gens[-1] >= len(generators):
380+
if gens and (gens[0] < 0 or gens[-1] >= len(generators)):
381381
raise ValueError('generator index out of bounds')
382382
normalized[deg] = gens
383383
try:

0 commit comments

Comments
 (0)