[sage-support] Re: Vector from polynomial coefficients -- length

2009-02-13 Thread Craig Citro
> Instead of using vectors, you should just use the indexing on the > polynomials to extract the coefficients you want: > > sage: matrix([[p[i] for i in range(3)] for p in [x^10%p1, x^11%p1, x^12%p1]]) > [1 0 1] > [1 1 1] > [1 1 0] > There's also the "padded_list" method, used exactly for getting

[sage-support] Re: Vector from polynomial coefficients -- length

2009-02-13 Thread Mike Hansen
Hello, On Fri, Feb 13, 2009 at 2:36 AM, acd wrote: > When I try the following in Sage, it fails because leading zeros in > the vector are skipped: The leading zeros aren't skipped -- the trailing ones are. For example, sage: R. = GF(2)[] sage: list(x^4+x^3+1) [1, 0, 0, 1, 1] The i^th entry i