[Numpy-discussion] linalg.norm missing an 'axis' kwarg?!
Hans Meine
meine at informatik.uni-hamburg.de
Thu Nov 20 05:54:52 EST 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.
Ciao,
Hans
-------------- 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://mail.python.org/pipermail/numpy-discussion/attachments/20081120/8fa6033b/attachment.bin>
More information about the NumPy-Discussion
mailing list