diff options
author | Charles Harris <charlesr.harris@gmail.com> | 2018-08-31 13:44:59 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-08-31 13:44:59 -0500 |
commit | 866589cdf7ecb3054ec3ae6493612d51c9d5e56d (patch) | |
tree | a37f31bc41dc8c67530a823391b96f058fe9c26c /numpy/lib/polynomial.py | |
parent | 089a0e0e9d1e32f57ddb89be5f450125bc58f57f (diff) | |
parent | f17f229a4a5def56282df4a7e51461c9374385d8 (diff) | |
download | numpy-866589cdf7ecb3054ec3ae6493612d51c9d5e56d.tar.gz |
Merge branch 'master' into warn-float16-nan
Diffstat (limited to 'numpy/lib/polynomial.py')
-rw-r--r-- | numpy/lib/polynomial.py | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/numpy/lib/polynomial.py b/numpy/lib/polynomial.py index 0e691f56e..9f3b84732 100644 --- a/numpy/lib/polynomial.py +++ b/numpy/lib/polynomial.py @@ -396,7 +396,11 @@ def polyfit(x, y, deg, rcond=None, full=False, w=None, cov=False): Fit a polynomial ``p(x) = p[0] * x**deg + ... + p[deg]`` of degree `deg` to points `(x, y)`. Returns a vector of coefficients `p` that minimises - the squared error. + the squared error in the order `deg`, `deg-1`, ... `0`. + + The `Polynomial.fit <numpy.polynomial.polynomial.Polynomial.fit>` class + method is recommended for new code as it is more stable numerically. See + the documentation of the method for more information. Parameters ---------- |