@@ -2587,8 +2587,9 @@ def norm(x, ord=None, axis=None, keepdims=False):
2587
2587
Input array. If `axis` is None, `x` must be 1-D or 2-D, unless `ord`
2588
2588
is None. If both `axis` and `ord` are None, the 2-norm of
2589
2589
``x.ravel`` will be returned.
2590
- ord : {non-zero int, inf, -inf, 'fro', 'nuc'}, optional
2591
- Order of the norm (see table under ``Notes``). inf means numpy's
2590
+ ord : {int, float, inf, -inf, 'fro', 'nuc'}, optional
2591
+ Order of the norm (see table under ``Notes`` for what values are
2592
+ supported for matrices and vectors respectively). inf means numpy's
2592
2593
`inf` object. The default is None.
2593
2594
axis : {None, int, 2-tuple of ints}, optional.
2594
2595
If `axis` is an integer, it specifies the axis of `x` along which to
@@ -3498,7 +3499,7 @@ def vector_norm(x, /, *, axis=None, keepdims=False, ord=2):
3498
3499
keepdims : bool, optional
3499
3500
If this is set to True, the axes which are normed over are left in
3500
3501
the result as dimensions with size one. Default: False.
3501
- ord : {1, -1, 2, -2, inf, -inf, 'fro', 'nuc' }, optional
3502
+ ord : {int, float, inf, -inf}, optional
3502
3503
The order of the norm. For details see the table under ``Notes``
3503
3504
in `numpy.linalg.norm`.
3504
3505
@@ -3525,6 +3526,8 @@ def vector_norm(x, /, *, axis=None, keepdims=False, ord=2):
3525
3526
>>> LA.vector_norm(b, ord=-np.inf)
3526
3527
1.0
3527
3528
3529
+ >>> LA.vector_norm(b, ord=0)
3530
+ 9.0
3528
3531
>>> LA.vector_norm(b, ord=1)
3529
3532
45.0
3530
3533
>>> LA.vector_norm(b, ord=-1)
0 commit comments