Re: best cumulative sum
- From: Robert Kern <robert.kern@xxxxxxxxx>
- Date: Sun, 20 Nov 2005 20:24:52 -0800
David Isaac wrote:
> What's the good way to produce a cumulative sum?
> E.g., given the list x,
> cumx = x[:]
> for i in range(1,len(x)):
> cumx[i] = cumx[i]+cumx[i-1]
>
> What's the better way?
Define better. More accurate? Less code?
--
Robert Kern
robert.kern@xxxxxxxxx
"In the fields of hell where the grass grows high
Are the graves of dreams allowed to die."
-- Richard Harter
.
- References:
- best cumulative sum
- From: David Isaac
- best cumulative sum
- Prev by Date: Re: best cumulative sum
- Next by Date: Re: about dictionary
- Previous by thread: Re: best cumulative sum
- Next by thread: Re: best cumulative sum
- Index(es):
Relevant Pages
|