Re: best cumulative sum
- From: "bonono@xxxxxxxxx" <bonono@xxxxxxxxx>
- Date: 20 Nov 2005 23:02:43 -0800
Erik Max Francis wrote:
> Micah Elliott wrote:
>
> > On Nov 21, David Isaac wrote:
> >
> >> What's the good way to produce a cumulative sum?
> >
> >>>> import operator
> >>>> x = 1,2,3
> >>>> reduce(operator.add, x)
> > 6
>
> Or just sum(x).
>
He seems to want scanl
.
- Follow-Ups:
- Re: best cumulative sum
- From: David Isaac
- Re: best cumulative sum
- References:
- best cumulative sum
- From: David Isaac
- Re: best cumulative sum
- From: Micah Elliott
- Re: best cumulative sum
- From: Erik Max Francis
- best cumulative sum
- Prev by Date: Re: Underscores in Python numbers
- Next by Date: Re: Python under Citrix Metaframe
- Previous by thread: Re: best cumulative sum
- Next by thread: Re: best cumulative sum
- Index(es):
Relevant Pages
|