diff options
-rw-r--r-- | numpy/linalg/linalg.py | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/numpy/linalg/linalg.py b/numpy/linalg/linalg.py index 7775e4c32..46fb2502e 100644 --- a/numpy/linalg/linalg.py +++ b/numpy/linalg/linalg.py @@ -2171,13 +2171,14 @@ def lstsq(a, b, rcond="warn"): r""" Return the least-squares solution to a linear matrix equation. - Computes the vector x that approximatively solves the equation + Computes the vector `x` that approximatively solves the equation ``a @ x = b``. The equation may be under-, well-, or over-determined (i.e., the number of linearly independent rows of `a` can be less than, equal to, or greater than its number of linearly independent columns). If `a` is square and of full rank, then `x` (but for round-off error) is the "exact" solution of the equation. Else, `x` minimizes the - Euclidean 2-norm :math:`|| b - a x ||`. + Euclidean 2-norm :math:`||b - ax||`. If there are multiple minimizing + solutions, the one with the smallest 2-norm :math:`||x||` is returned. Parameters ---------- |