Re: [Numpy-discussion] how to tally the values seen

2010-04-14 Thread Peter Shinners
On 04/13/2010 11:44 PM, Gökhan Sever wrote: On Wed, Apr 14, 2010 at 1:34 AM, Warren Weckesser > wrote: Gökhan Sever wrote: > > > On Wed, Apr 14, 2010 at 1:10 AM, Peter Shinners mailto:p...@shinners.org> >

Re: [Numpy-discussion] how to tally the values seen

2010-04-13 Thread Gökhan Sever
On Wed, Apr 14, 2010 at 1:34 AM, Warren Weckesser < warren.weckes...@enthought.com> wrote: > Gökhan Sever wrote: > > > > > > On Wed, Apr 14, 2010 at 1:10 AM, Peter Shinners > > wrote: > > > > I have an array that represents the number of times a value has been > >

Re: [Numpy-discussion] how to tally the values seen

2010-04-13 Thread Warren Weckesser
Gökhan Sever wrote: > > > On Wed, Apr 14, 2010 at 1:10 AM, Peter Shinners > wrote: > > I have an array that represents the number of times a value has been > given. I'm trying to find a direct numpy way to add into these sums > without requiring a Python loop.

Re: [Numpy-discussion] how to tally the values seen

2010-04-13 Thread Gökhan Sever
On Wed, Apr 14, 2010 at 1:10 AM, Peter Shinners wrote: > I have an array that represents the number of times a value has been > given. I'm trying to find a direct numpy way to add into these sums > without requiring a Python loop. > > For example, say there are 10 possible values. I start with an

[Numpy-discussion] how to tally the values seen

2010-04-13 Thread Peter Shinners
I have an array that represents the number of times a value has been given. I'm trying to find a direct numpy way to add into these sums without requiring a Python loop. For example, say there are 10 possible values. I start with an array of zeros. >>> counts = numpy.zeros(10, numpy.int) Now