diff options
author | mattip <matti.picus@gmail.com> | 2019-11-23 17:42:31 -0800 |
---|---|---|
committer | mattip <matti.picus@gmail.com> | 2019-11-23 17:42:31 -0800 |
commit | fb3e779ef2e3133fd5ed7acf2b8de81d31248197 (patch) | |
tree | e6273fa39ca8007ab2f9bc5f083ad3966fbe9dd5 /numpy/linalg/linalg.py | |
parent | e9452bf0baece0ccee2e5bb90c322190e9b8493f (diff) | |
download | numpy-fb3e779ef2e3133fd5ed7acf2b8de81d31248197.tar.gz |
DOC: fix docstring of np.linalg.norm
Diffstat (limited to 'numpy/linalg/linalg.py')
-rw-r--r-- | numpy/linalg/linalg.py | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/numpy/linalg/linalg.py b/numpy/linalg/linalg.py index 665b9fbec..d38ab9d05 100644 --- a/numpy/linalg/linalg.py +++ b/numpy/linalg/linalg.py @@ -2325,16 +2325,19 @@ def norm(x, ord=None, axis=None, keepdims=False): Parameters ---------- x : array_like - Input array. If `axis` is None, `x` must be 1-D or 2-D. + Input array. If `axis` is None, `x` must be 1-D or 2-D, unless `ord` + is None. If both `axis` is None and `ord` is None, a vector norm of + ``x.ravel`` wil be returned. ord : {non-zero int, inf, -inf, 'fro', 'nuc'}, optional Order of the norm (see table under ``Notes``). inf means numpy's - `inf` object. - axis : {int, 2-tuple of ints, None}, optional + `inf` object. Default is None. + axis : {None, int, 2-tuple of ints}, optional. If `axis` is an integer, it specifies the axis of `x` along which to compute the vector norms. If `axis` is a 2-tuple, it specifies the axes that hold 2-D matrices, and the matrix norms of these matrices are computed. If `axis` is None then either a vector norm (when `x` - is 1-D) or a matrix norm (when `x` is 2-D) is returned. + is 1-D) or a matrix norm (when `x` is 2-D) is returned. Default is + None. .. versionadded:: 1.8.0 |