diff options
author | Matti Picus <matti.picus@gmail.com> | 2019-02-20 08:45:47 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-02-20 08:45:47 +0200 |
commit | 378cadfaf3e5a8b5d84583e5ee7f2d25bfa97cb4 (patch) | |
tree | 3c42c93cd70df62cf4799242c039705eb3dec701 | |
parent | 95db8c28841a02a4a871c08a6e10115f471c12c5 (diff) | |
parent | 2096b6d20d45e990a77ebea6735a41c191f008b0 (diff) | |
download | numpy-378cadfaf3e5a8b5d84583e5ee7f2d25bfa97cb4.tar.gz |
Merge pull request #12885 from adamjstewart/docs/np-linalg-docs
DOC: fix math formatting of np.linalg.lstsq docs
-rw-r--r-- | numpy/linalg/linalg.py | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/numpy/linalg/linalg.py b/numpy/linalg/linalg.py index 189c64a39..304fce69f 100644 --- a/numpy/linalg/linalg.py +++ b/numpy/linalg/linalg.py @@ -1010,7 +1010,7 @@ def eigvals(a): See Also -------- eig : eigenvalues and right eigenvectors of general arrays - eigvalsh : eigenvalues of real symmetric or complex Hermitian + eigvalsh : eigenvalues of real symmetric or complex Hermitian (conjugate symmetric) arrays. eigh : eigenvalues and eigenvectors of real symmetric or complex Hermitian (conjugate symmetric) arrays. @@ -1214,7 +1214,7 @@ def eig(a): -------- eigvals : eigenvalues of a non-symmetric array. - eigh : eigenvalues and eigenvectors of a real symmetric or complex + eigh : eigenvalues and eigenvectors of a real symmetric or complex Hermitian (conjugate symmetric) array. eigvalsh : eigenvalues of a real symmetric or complex Hermitian @@ -2130,16 +2130,16 @@ def _lstsq_dispatcher(a, b, rcond=None): @array_function_dispatch(_lstsq_dispatcher) def lstsq(a, b, rcond="warn"): - """ + r""" Return the least-squares solution to a linear matrix equation. - Solves the equation `a x = b` by computing a vector `x` that - minimizes the Euclidean 2-norm `|| b - a x ||^2`. 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. + Solves the equation :math:`a x = b` by computing a vector `x` that + minimizes the squared Euclidean 2-norm :math:`\| b - a x \|^2_2`. + 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. Parameters ---------- |