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

Anne Archibald peridot.faceted@gmail....
Fri Dec 28 17:53:44 CST 2007


On 28/12/2007, Christopher Barker <Chris.Barker@noaa.gov> 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. 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.
I don't even like myarray.max(), preferring numpy.amax() or
numpy.maximum.reduce.

I realize we can't remove any array methods, but I don't think we
should add an array method for every unary function - surely you don't
want to see myarray.arctan()?

Anne


More information about the Numpy-discussion mailing list