On Tuesday, May 7, 2013 2:45:16 PM UTC-7, William wrote: > > On Tue, May 7, 2013 at 2:10 PM, David Roe <roed...@gmail.com <javascript:>> > wrote: > > I find the following behavior to be quite confusing (and it just cost me > an > > hour tracking down). > > > > For consistency with multivariate polynomials, the coefficient method on > > univariate polynomials (and power series) only returns the nonzero > > coefficients. So: > > > > sage: R.<x> = ZZ[] > > sage: (x^2+1).coefficients() > > [1, 1] > > ACK. My feeling -- and my random testing of people just now -- is > that this design is just a bug. Most people would expect > "(x^2+1).coefficients()" to output [1,0,1]. > > Whose doing is this? >
<http://trac.sagemath.org/sage_trac/ticket/2081> I think that the docstring for "nonzero_coefficients" should also mention the "exponents" method, since you will probably want to use them together more often than not. -- John -- You received this message because you are subscribed to the Google Groups "sage-devel" group. To unsubscribe from this group and stop receiving emails from it, send an email to sage-devel+unsubscr...@googlegroups.com. To post to this group, send email to sage-devel@googlegroups.com. Visit this group at http://groups.google.com/group/sage-devel?hl=en. For more options, visit https://groups.google.com/groups/opt_out.