The old Google Groups will be going away soon, but your browser is incompatible with the new version.
How to convert a powerseries to a vector
 There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic. There was an error processing your request. Please try again. Standard view   View as tree
 2 messages

From:
To:
Cc:
Followup To:
Subject:
 Validation: For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon.

More options Oct 4 2012, 8:51 am
From: Zhibin Liang <liang...@gmail.com>
Date: Thu, 4 Oct 2012 20:51:06 +0800
Local: Thurs, Oct 4 2012 8:51 am
Subject: How to convert a powerseries to a vector
Dear all,

F.<T>=PowerSeriesRing(ZZ)
f=(1+T^3).O(4)
f.coefficients()

Then it turns out : [0,1]

But I really want [1,0,0,1]

How to realize this?

--

Very best wishes
Zhibin Liang

Building 104 Room 103
Nanhudongyuanyiqu
Wangjing, Chaoyang District
Beijing China,
100102

To post a message you must first join this group.
You do not have the permission required to post.
More options Oct 4 2012, 9:02 am
From: John Cremona <john.crem...@gmail.com>
Date: Thu, 4 Oct 2012 14:02:20 +0100
Local: Thurs, Oct 4 2012 9:02 am
Subject: Re: [sage-nt] How to convert a powerseries to a vector
On 4 October 2012 13:51, Zhibin Liang <liang...@gmail.com> wrote:

> Dear all,

> F.<T>=PowerSeriesRing(ZZ)
> f=(1+T^3).O(4)
> f.coefficients()

> Then it turns out : [0,1]

> But I really want [1,0,0,1]

> How to realize this?

sage: list(f)
[1, 0, 0, 1]

list() will use the iterator function which in turn uses the
subscripting operator:

sage: f[0], f[1], f[2], f[3]
(1, 0, 0, 1)

John