summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCharles Harris <charlesr.harris@gmail.com>2019-11-25 15:36:57 -0800
committerGitHub <noreply@github.com>2019-11-25 15:36:57 -0800
commite3b15d93f11b91f0a4c8f027b264eee741dda124 (patch)
treeb84a417646f901ae683f335ec4051025f29bbff2
parentd051ab51cb552e26a11554e406c092de766f239e (diff)
parentb2747fbb920da098a06e3f7fcf7d0952b9be4af0 (diff)
downloadnumpy-e3b15d93f11b91f0a4c8f027b264eee741dda124.tar.gz
Merge pull request #14973 from mattip/norm-doc
DOC: fix docstring of np.linalg.norm
-rw-r--r--numpy/linalg/linalg.py11
1 files changed, 7 insertions, 4 deletions
diff --git a/numpy/linalg/linalg.py b/numpy/linalg/linalg.py
index 665b9fbec..f1b2c2228 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` and `ord` are None, the 2-norm of
+ ``x.ravel`` will 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. The 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. The default
+ is None.
.. versionadded:: 1.8.0