Re: [Numpy-discussion] stumped numpy user seeks help

2006-08-30 Thread Bill Baxter
On 8/30/06, Sven Schreiber <[EMAIL PROTECTED]> wrote: > Mathew Yeates schrieb: > will be a numpy matrix, use if you don't like that. But here > it's really nice to work with matrices, because otherwise .sum() will > give you a 1-d array sometimes, and that will suddenly look like a row > to (inst

Re: [Numpy-discussion] stumped numpy user seeks help

2006-08-30 Thread Stefan van der Walt
On Tue, Aug 29, 2006 at 03:46:45PM -0700, Mathew Yeates wrote: > My head is about to explode. > > I have an M by N array of floats. Associated with the columns are > character labels > ['a','b','b','c','d','e','e','e'] note: already sorted so duplicates > are contiguous > > I want to replace t

Re: [Numpy-discussion] stumped numpy user seeks help

2006-08-30 Thread Sven Schreiber
Mathew Yeates schrieb: > My head is about to explode. > > I have an M by N array of floats. Associated with the columns are > character labels > ['a','b','b','c','d','e','e','e'] note: already sorted so duplicates > are contiguous > > I want to replace the 2 'b' columns with the sum of the 2 c

Re: [Numpy-discussion] stumped numpy user seeks help

2006-08-29 Thread Charles R Harris
On 8/29/06, Keith Goodman <[EMAIL PROTECTED]> wrote: On 8/29/06, Mathew Yeates <[EMAIL PROTECTED]> wrote:> I have an M by N array of floats. Associated with the columns are> character labels> ['a','b','b','c','d','e','e','e']  note: already sorted so duplicates > are contiguous>> I want to replace

Re: [Numpy-discussion] stumped numpy user seeks help

2006-08-29 Thread Keith Goodman
On 8/29/06, Mathew Yeates <[EMAIL PROTECTED]> wrote: > I have an M by N array of floats. Associated with the columns are > character labels > ['a','b','b','c','d','e','e','e'] note: already sorted so duplicates > are contiguous > > I want to replace the 2 'b' columns with the sum of the 2 columns

[Numpy-discussion] stumped numpy user seeks help

2006-08-29 Thread Mathew Yeates
My head is about to explode. I have an M by N array of floats. Associated with the columns are character labels ['a','b','b','c','d','e','e','e'] note: already sorted so duplicates are contiguous I want to replace the 2 'b' columns with the sum of the 2 columns. Similarly, replace the 3 'e' c