Re: [Numpy-discussion] any better way to normalize a matrix

2007-12-28 Thread Anne Archibald
On 28/12/2007, Christopher Barker <[EMAIL PROTECTED]> wrote: > Anne Archibald wrote: > > Numpy provides ufuncs as general powerful tools for operating on > > matrices. More can be added relatively easily, they provide not just > > the basic "apply" operation but also "outer" and others. Adding > >

Re: [Numpy-discussion] any better way to normalize a matrix

2007-12-28 Thread Christopher Barker
Anne Archibald wrote: > Numpy provides ufuncs as general powerful tools for operating on > matrices. More can be added relatively easily, they provide not just > the basic "apply" operation but also "outer" and others. Adding > another way to accomplish the same operation just adds bulk to numpy.

Re: [Numpy-discussion] any better way to normalize a matrix

2007-12-28 Thread Anne Archibald
On 28/12/2007, Christopher Barker <[EMAIL PROTECTED]> wrote: > I like the array methods a lot -- is there any particular reason there > is no ndarray.abs(), or has it just not been added? Here I have to disagree with you. Numpy provides ufuncs as general powerful tools for operating on matrices.

Re: [Numpy-discussion] any better way to normalize a matrix

2007-12-28 Thread Christopher Barker
Anne had it right -- much of the point of numpy is to use nd-arrays as the powerful objects they are - not just containers. Below is a version of your code for comparison. Note to numpy devs: I like the array methods a lot -- is there any particular reason there is no ndarray.abs(), or has it