diff options
Diffstat (limited to 'numpy/polynomial')
-rw-r--r-- | numpy/polynomial/__init__.py | 2 | ||||
-rw-r--r-- | numpy/polynomial/_polybase.py | 12 | ||||
-rw-r--r-- | numpy/polynomial/chebyshev.py | 20 | ||||
-rw-r--r-- | numpy/polynomial/hermite.py | 14 | ||||
-rw-r--r-- | numpy/polynomial/hermite_e.py | 14 | ||||
-rw-r--r-- | numpy/polynomial/laguerre.py | 16 | ||||
-rw-r--r-- | numpy/polynomial/legendre.py | 14 | ||||
-rw-r--r-- | numpy/polynomial/polynomial.py | 12 | ||||
-rw-r--r-- | numpy/polynomial/tests/test_classes.py | 2 |
9 files changed, 53 insertions, 53 deletions
diff --git a/numpy/polynomial/__init__.py b/numpy/polynomial/__init__.py index 4b4361163..5a3addf4c 100644 --- a/numpy/polynomial/__init__.py +++ b/numpy/polynomial/__init__.py @@ -164,7 +164,7 @@ def set_default_printstyle(style): 1.0 + 2.0 x**1 + 3.0 x**2 >>> print(c) 1.0 + 2.0 T_1(x) + 3.0 T_2(x) - >>> # Formatting supercedes all class/package-level defaults + >>> # Formatting supersedes all class/package-level defaults >>> print(f"{p:unicode}") 1.0 + 2.0·x¹ + 3.0·x² """ diff --git a/numpy/polynomial/_polybase.py b/numpy/polynomial/_polybase.py index 5525b232b..155d72805 100644 --- a/numpy/polynomial/_polybase.py +++ b/numpy/polynomial/_polybase.py @@ -344,7 +344,7 @@ class ABCPolyBase(abc.ABC): # Polynomial coefficient # The coefficient array can be an object array with elements that # will raise a TypeError with >= 0 (e.g. strings or Python - # complex). In this case, represent the coeficient as-is. + # complex). In this case, represent the coefficient as-is. try: if coef >= 0: next_term = f"+ {coef}" @@ -958,12 +958,12 @@ class ABCPolyBase(abc.ABC): of interest, do ``new_series.convert().coef``. [resid, rank, sv, 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`. + - 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`. For more details, see `linalg.lstsq`. diff --git a/numpy/polynomial/chebyshev.py b/numpy/polynomial/chebyshev.py index 210000ec4..2b3268aeb 100644 --- a/numpy/polynomial/chebyshev.py +++ b/numpy/polynomial/chebyshev.py @@ -131,9 +131,9 @@ chebtrim = pu.trimcoef # def _cseries_to_zseries(c): - """Covert Chebyshev series to z-series. + """Convert Chebyshev series to z-series. - Covert a Chebyshev series to the equivalent z-series. The result is + Convert a Chebyshev series to the equivalent z-series. The result is never an empty array. The dtype of the return is the same as that of the input. No checks are run on the arguments as this routine is for internal use. @@ -156,9 +156,9 @@ def _cseries_to_zseries(c): def _zseries_to_cseries(zs): - """Covert z-series to a Chebyshev series. + """Convert z-series to a Chebyshev series. - Covert a z series to the equivalent Chebyshev series. The result is + Convert a z series to the equivalent Chebyshev series. The result is never an empty array. The dtype of the return is the same as that of the input. No checks are run on the arguments as this routine is for internal use. @@ -1598,12 +1598,12 @@ def chebfit(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`. @@ -1611,7 +1611,7 @@ def chebfit(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 diff --git a/numpy/polynomial/hermite.py b/numpy/polynomial/hermite.py index c1b9f71c0..9b0735a9a 100644 --- a/numpy/polynomial/hermite.py +++ b/numpy/polynomial/hermite.py @@ -419,7 +419,7 @@ def hermmulx(c): .. math:: - xP_i(x) = (P_{i + 1}(x)/2 + i*P_{i - 1}(x)) + xP_i(x) = (P_{i + 1}(x)/2 + i*P_{i - 1}(x)) Examples -------- @@ -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 diff --git a/numpy/polynomial/hermite_e.py b/numpy/polynomial/hermite_e.py index b7095c910..182c562c2 100644 --- a/numpy/polynomial/hermite_e.py +++ b/numpy/polynomial/hermite_e.py @@ -414,7 +414,7 @@ def hermemulx(c): .. math:: - xP_i(x) = (P_{i + 1}(x) + iP_{i - 1}(x))) + xP_i(x) = (P_{i + 1}(x) + iP_{i - 1}(x))) Examples -------- @@ -1315,12 +1315,12 @@ def hermefit(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`. @@ -1328,7 +1328,7 @@ def hermefit(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 diff --git a/numpy/polynomial/laguerre.py b/numpy/polynomial/laguerre.py index d3b6432dc..d9ca373dd 100644 --- a/numpy/polynomial/laguerre.py +++ b/numpy/polynomial/laguerre.py @@ -414,7 +414,7 @@ def lagmulx(c): .. math:: - xP_i(x) = (-(i + 1)*P_{i + 1}(x) + (2i + 1)P_{i}(x) - iP_{i - 1}(x)) + xP_i(x) = (-(i + 1)*P_{i + 1}(x) + (2i + 1)P_{i}(x) - iP_{i - 1}(x)) Examples -------- @@ -1030,7 +1030,7 @@ def lagval3d(x, y, z, c): Returns ------- values : ndarray, compatible object - The values of the multidimension polynomial on points formed with + The values of the multidimensional polynomial on points formed with triples of corresponding values from `x`, `y`, and `z`. See Also @@ -1321,12 +1321,12 @@ def lagfit(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`. @@ -1334,7 +1334,7 @@ def lagfit(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 diff --git a/numpy/polynomial/legendre.py b/numpy/polynomial/legendre.py index d4cf4accf..2e8052e7c 100644 --- a/numpy/polynomial/legendre.py +++ b/numpy/polynomial/legendre.py @@ -425,7 +425,7 @@ def legmulx(c): See Also -------- - legadd, legmul, legmul, legdiv, legpow + legadd, legmul, legdiv, legpow Notes ----- @@ -1339,12 +1339,12 @@ def legfit(x, y, deg, rcond=None, full=False, w=None): returned `coef`. [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`. @@ -1352,7 +1352,7 @@ def legfit(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 diff --git a/numpy/polynomial/polynomial.py b/numpy/polynomial/polynomial.py index d8a032068..2fead88ab 100644 --- a/numpy/polynomial/polynomial.py +++ b/numpy/polynomial/polynomial.py @@ -1268,12 +1268,12 @@ def polyfit(x, y, deg, rcond=None, full=False, w=None): fit to the data in `y`'s `k`-th column. [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`. @@ -1281,7 +1281,7 @@ def polyfit(x, y, deg, rcond=None, full=False, w=None): ------ RankWarning Raised if the matrix in the least-squares fit is rank deficient. - The warning is only raised if `full` == False. The warnings can + The warning is only raised if ``full == False``. The warnings can be turned off by: >>> import warnings diff --git a/numpy/polynomial/tests/test_classes.py b/numpy/polynomial/tests/test_classes.py index 8e71a1945..6322062f2 100644 --- a/numpy/polynomial/tests/test_classes.py +++ b/numpy/polynomial/tests/test_classes.py @@ -597,4 +597,4 @@ class TestInterpolate: for deg in range(0, 10): for t in range(0, deg + 1): p = Chebyshev.interpolate(powx, deg, domain=[0, 2], args=(t,)) - assert_almost_equal(p(x), powx(x, t), decimal=12) + assert_almost_equal(p(x), powx(x, t), decimal=11) |