On Tue, May 10, 2011 at 10:37 PM, Mike Hansen <mhan...@gmail.com> wrote:
> On Tue, May 10, 2011 at 6:52 PM, Rob Beezer <goo...@beezer.cotse.net> wrote:
>> OK, thanks for the explanation, Tom.  p.exponents() was the missing
>> piece I did not have.
>
> It would probably make sense to have p.monomials() method to be
> consistent with the multivariate case:
>
> sage: R.<t,s> = QQ[]
> sage: p = t^4 + 8
> sage: p.coefficients()
> [1, 8]
> sage: p.monomials()
> [t^4, 1]
> sage: sum(c*m for c,m in zip(p.coefficients(), p.monomials()))
> t^4 + 8

+1

> p.coeffs() might be better off renamed to something like
> all_coefficients or dense_coefficients or ....

I use p.coeffs() pretty often.  Perhaps p.coefficients should take an
additional argument: p.coeffs could be an alias to
p.coefficients(dense=True), and get deprecated.

-- 
To post to this group, send an email to sage-devel@googlegroups.com
To unsubscribe from this group, send an email to 
sage-devel+unsubscr...@googlegroups.com
For more options, visit this group at http://groups.google.com/group/sage-devel
URL: http://www.sagemath.org

Reply via email to