From 89df711a83b1cb34457bd49c73085811dcf46783 Mon Sep 17 00:00:00 2001 From: Samyak S Sarnayak Date: Mon, 20 Sep 2021 19:44:24 +0530 Subject: DOC: fix formatting of a return value of polynomial fit methods Fixes #19897 The 2nd return value of the following methods/functions were badly formatted and the list was all appearing in a single line. Changed them to separate points which are rendered nicely. - numpy.polyfit - numpy.ma.polyfit - numpy.polynomial.polynomial.polyfit - numpy.polynomial.polynomial.Polynomial.fit - numpy.polynomial.chebyshev.chebfit - numpy.polynomial.chebyshev.Chebyshev.fit - numpy.polynomial.hermite.hermfit - numpy.polynomial.hermite.Hermite.fit - numpy.polynomial.hermite_e.hermefit - numpy.polynomial.hermite_e.HermiteE.fit - numpy.polynomial.laguerre.lagfit - numpy.polynomial.laguerre.Laguerre.fit - numpy.polynomial.legendre.legfit - numpy.polynomial.legendre.Legendre.fit Also fixed erroneous links to `numpy.full` which were actually referring to the `full` argument. Changed those to code strings (double backticks) from single backticks. Also fixed formatting issues in the 3rd return value of numpy.polyfit (and hence also numpy.ma.polyfit). --- numpy/polynomial/hermite.py | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'numpy/polynomial/hermite.py') diff --git a/numpy/polynomial/hermite.py b/numpy/polynomial/hermite.py index c1b9f71c0..9800063f0 100644 --- a/numpy/polynomial/hermite.py +++ b/numpy/polynomial/hermite.py @@ -1324,12 +1324,12 @@ def hermfit(x, y, deg, rcond=None, full=False, w=None): `k`. [residuals, rank, singular_values, rcond] : list - These values are only returned if `full` = True + These values are only returned if ``full == True`` - resid -- sum of squared residuals of the least squares fit - rank -- the numerical rank of the scaled Vandermonde matrix - sv -- singular values of the scaled Vandermonde matrix - rcond -- value of `rcond`. + - residuals -- sum of squared residuals of the least squares fit + - rank -- the numerical rank of the scaled Vandermonde matrix + - singular_values -- singular values of the scaled Vandermonde matrix + - rcond -- value of `rcond`. For more details, see `numpy.linalg.lstsq`. @@ -1337,7 +1337,7 @@ def hermfit(x, y, deg, rcond=None, full=False, w=None): ----- RankWarning The rank of the coefficient matrix in the least-squares fit is - deficient. The warning is only raised if `full` = False. The + deficient. The warning is only raised if ``full == False``. The warnings can be turned off by >>> import warnings -- cgit v1.2.1