Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Trac #34355: avoid constructing list of all base-field elements in Qu…
…aternionAlgebra_ab.modp_splitting_data() This patch is from Rémy Oudompheng: {{{#!patch diff --git a/src/sage/algebras/quatalg/quaternion_algebra.py b/src/sage/algebras/quatalg/quaternion_algebra.py index 3bde7b2153..3e12785e14 100644 --- a/src/sage/algebras/quatalg/quaternion_algebra.py +++ b/src/sage/algebras/quatalg/quaternion_algebra.py @@ -1232,7 +1232,7 @@ class QuaternionAlgebra_ab(QuaternionAlgebra_abstract): raise NotImplementedError("algorithm for computing local splittings not implemented in general (currently require the first invariant to be coprime to p)") i2inv = ~i2 a = None - for b in list(F): + for b in F: if not b: continue c = j2 + i2inv * b*b }}} Obviously, constructing a list of all elements is a very bad idea for non-tiny base fields. URL: https://trac.sagemath.org/34355 Reported by: lorenz Ticket author(s): Rémy Oudompheng Reviewer(s): Travis Scrimshaw
- Loading branch information