Unexpected deprecation warning
When running these statements :
sage: F = GF(11)
sage: n, k = 10 , 5
sage: C = GeneralizedReedSolomonCode(F.list()[:n], k)
sage: E = EncoderGRSEvaluationPolynomial(C)
sage: p = x^2 + 3*x + 10
sage: E.encode(p)
I receive that for the last line :
DeprecationWarning: Substitution using function-call syntax and unnamed arguments is deprecated and will be removed from a future release of Sage; you can use named arguments instead, like EXPR(x=..., y=...) See http://trac.sagemath.org/5930 for details.
Must be checked.
Comments (8)
-
-
Thus in the encoder when it calls
p(alpha)
, this is application ofalpha
to a non-specified variable in a symbolic expression. -
What do you mean in your second comment ? Did you mean an application of
p
instead of an applicationalpha
? -
When
p(alpha)
is executed thenalpha
should replace some variable inp
. The intention of the code is that it replacesx
. But sincep
is aSymbolicExpression
, which could contain any number of variables with no canonical ordering, Sage doesn't really know which variable to replace. That's the reason for the deprecation warning (since early versions of Sage would considerx
a "special" variable which was to be replaced whenever it was left unspecified). -
reporter - changed status to resolved
Resolved issue
#89→ <<cset 4084c8810395>>
-
- changed status to open
I don't like the way you resolved this. In my opinion, it is good that the user is warned that he didn't supply a polynomial but a
SymbolicExpression
. The "fix" should be in the example you provided at the top, whereF[x]
should be declared. -
reporter Indeed, if we use :
sage: F = GF(11) sage: n, k = 10 , 5 sage: C = GeneralizedReedSolomonCode(F.list()[:n], k) sage: E = EncoderGRSEvaluationPolynomial(C) sage: K.<x> = F[] sage: p = x^2 + 3*x + 10 sage: E.encode(p)
instead, it works just fine. I remove the change.
-
- changed status to resolved
- Log in to comment
I think it's because x is a symbolic expression in the above; you didn't introduce
PolynomialRing(F,'x')
.