On 7 August 2018 at 20:56, Vincent Delecroix <[email protected]> wrote:
> The global binomial function is to be blamed. The one > in arith works fine > > sage: R.<q> = ZZ[] > sage: sage.arith.all.binomial(q,2) > 1/2*q^2 - 1/2*q > sage: sage.arith.all.binomial(q,2).parent() > Univariate Polynomial Ring in q over Rational Field > Thanks. So if I put from sage.arith.all import binomial at the top then all works as expected. This does leave the questions as to why the symbolic version is imported but not this one. Ideally the global function would test the type / parent of the first input and use that to decide which function to call. The current practice will be a cause of bugs. John > > Vincent > > On 07/08/2018 07:08, J E Cremona wrote: > >> sage: R.<q> = ZZ[] >> sage: b = binomial(q,2) >> sage: b >> 1/2*(q - 1)*q >> sage: b.parent() >> Symbolic Ring >> >> especially when compared with >> >> sage: binomial(q,1).parent() >> Univariate Polynomial Ring in q over Integer Ring >> >> John >> >> > -- > You received this message because you are subscribed to the Google Groups > "sage-support" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to [email protected]. > To post to this group, send email to [email protected]. > Visit this group at https://groups.google.com/group/sage-support. > For more options, visit https://groups.google.com/d/optout. > -- You received this message because you are subscribed to the Google Groups "sage-support" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. Visit this group at https://groups.google.com/group/sage-support. For more options, visit https://groups.google.com/d/optout.
