On Tue, May 7, 2013 at 2:10 PM, David Roe <roed.m...@gmail.com> 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? William > > I would propose that we rename this method coefficients_nonzero() in both > univariate and multivariate contexts and deprecate the current behavior, > then eventually change the behavior for univariate polynomials and power > series to be an alias for list (removing the coefficients function entirely > for multivariate polynomials). > > Thoughts? > David > > -- > 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. > > -- William Stein Professor of Mathematics University of Washington http://wstein.org -- 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.