Skip to content
This repository has been archived by the owner on Jan 30, 2023. It is now read-only.

Commit

Permalink
prevent crash in _random_example_for_testing() when group is trivial
Browse files Browse the repository at this point in the history
  • Loading branch information
yyyyx4 committed Aug 22, 2022
1 parent 986462f commit 156c820
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/sage/schemes/elliptic_curves/hom_velusqrt.py
Original file line number Diff line number Diff line change
Expand Up @@ -1214,6 +1214,8 @@ def _random_example_for_testing():
E.short_weierstrass_model()
except ValueError:
continue
if E.cardinality() < 5:
continue
A = E.abelian_group()
ds = max(A.invariants()).prime_to_m_part(2).divisors()
ds = [d for d in ds if 5 <= d < 1000]
Expand Down

0 comments on commit 156c820

Please sign in to comment.