summaryrefslogtreecommitdiff
path: root/numpy/lib/polynomial.py
diff options
context:
space:
mode:
authorMatti Picus <matti.picus@gmail.com>2018-08-14 18:01:20 -0700
committerCharles Harris <charlesr.harris@gmail.com>2018-08-14 20:01:20 -0500
commit4a0c307b1af162c4e3363a8b4c90fa1a138adebf (patch)
treee7e8d8d6ce98051d897f12ebe190a09b855bf54e /numpy/lib/polynomial.py
parente759594d126ccfa16b871e1d484b52e36bffd001 (diff)
downloadnumpy-4a0c307b1af162c4e3363a8b4c90fa1a138adebf.tar.gz
DOC: recommend polynomial.Polynomial over np.polyfit (#11733)
* DOC: reccomend polynomail.Polynomial over np.polyfit * update from review * update from review, fix links * fix from review
Diffstat (limited to 'numpy/lib/polynomial.py')
-rw-r--r--numpy/lib/polynomial.py7
1 files changed, 6 insertions, 1 deletions
diff --git a/numpy/lib/polynomial.py b/numpy/lib/polynomial.py
index 0e691f56e..0de39877a 100644
--- a/numpy/lib/polynomial.py
+++ b/numpy/lib/polynomial.py
@@ -396,7 +396,12 @@ 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 for the method for more information, or the convenience
+ function `polynomial.polyfit <numpy.polynomial.polynomial.polyfit>`.
Parameters
----------