diff options
author | John Law <johnlaw.po@gmail.com> | 2019-05-27 09:17:39 +0800 |
---|---|---|
committer | John Law <johnlaw.po@gmail.com> | 2019-05-27 09:17:39 +0800 |
commit | 586234d66c76c870071ad55ddb22bf39e9c647fb (patch) | |
tree | 84659092ccc0fcadb6ec993cf4d7389d6d0aa735 /numpy/linalg/linalg.py | |
parent | 849e4d429951ad93691e6149d070b9d31536cc12 (diff) | |
download | numpy-586234d66c76c870071ad55ddb22bf39e9c647fb.tar.gz |
DOC: Add return section to linalg.matrix_rank & tensordot
This patch adds two return sections to them. Also one or two minor formatting issues are resolved.
Addresses #13630.
Diffstat (limited to 'numpy/linalg/linalg.py')
-rw-r--r-- | numpy/linalg/linalg.py | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/numpy/linalg/linalg.py b/numpy/linalg/linalg.py index 27ec62403..f599f8a58 100644 --- a/numpy/linalg/linalg.py +++ b/numpy/linalg/linalg.py @@ -571,7 +571,7 @@ def matrix_power(a, n): Parameters ---------- a : (..., M, M) array_like - Matrix to be "powered." + Matrix to be "powered". n : int The exponent can be any integer or long integer, positive, negative, or zero. @@ -1790,9 +1790,9 @@ def matrix_rank(M, tol=None, hermitian=False): Parameters ---------- M : {(M,), (..., M, N)} array_like - input vector or stack of matrices + Input vector or stack of matrices. tol : (...) array_like, float, optional - threshold below which SVD values are considered zero. If `tol` is + Threshold below which SVD values are considered zero. If `tol` is None, and ``S`` is an array with singular values for `M`, and ``eps`` is the epsilon value for datatype of ``S``, then `tol` is set to ``S.max() * max(M.shape) * eps``. @@ -1806,6 +1806,11 @@ def matrix_rank(M, tol=None, hermitian=False): .. versionadded:: 1.14 + Returns + ------- + rank : (...) array_like + Rank of M. + Notes ----- The default threshold to detect rank deficiency is a test on the magnitude |