[Numpy-discussion] linalg.norm missing an 'axis' kwarg?!

Hans Meine meine@informatik.uni-hamburg...
Thu Nov 20 04:54:52 CST 2008

On Thursday 20 November 2008 11:11:14 Hans Meine wrote:
> I have a 2D matrix comprising a sequence of vectors, and I want to compute
> the norm of each vector.  np.linalg.norm seems to be the best bet, but it
> does not support axis.  Wouldn't this be a nice feature?

Here's a basic implementation.  docstring + tests not updated yet, also I 
wonder whether axis should be the first argument, but that could create 
compatibility problems.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: numpy_norm_axis.diff
Type: text/x-patch
Size: 1597 bytes
Desc: not available
Url : http://projects.scipy.org/pipermail/numpy-discussion/attachments/20081120/8fa6033b/attachment.bin 

More information about the Numpy-discussion mailing list