Open videlec opened 6 years ago
Author: Vincent Delecroix
Description changed:
---
+++
@@ -7,3 +7,5 @@
...
UnboundLocalError: local variable 'E' referenced before assignment
+ +We make it more user friendly by allowing the above in some duck typing fashion.
Branch: u/vdelecroix/24526
It may be better to keep the branch dealing with tuples/lists for speed reasons... Perhaps it doesn't matter (I don't know how much it is used or what alternatives exist for constructing extensions without too much overhead), but your patch makes the call to extension()
in GF(3).extension([1, 0, 1], 'a')
70% slower on my system.
Should this ducktyping really all be happening under the hood without notifying the user? I think a more readable error message would be better, or at least a warning. We don't want people to use SR for polynomials in their code, do we?
Also, is this
+ else:
+ modulus = modulus.change_ring(self)
necessary? The GF
constructor already does modulus = R(modulus).monic()
, where R = PolynomialRing(FiniteField(p), 'x').
Does not apply anymore.
Work Issues: merge conflict
Please rebase, and I can review.
GF(p).extension(xxx)
does not accept symbolic polynomials... and the error is crypticWe make it more user friendly by allowing the above in some duck typing fashion.
Component: number theory
Work Issues: merge conflict
Author: Vincent Delecroix
Branch/Commit: u/vdelecroix/24526 @
ba84546
Issue created by migration from https://trac.sagemath.org/ticket/24526