summaryrefslogtreecommitdiff
path: root/numpy/lib/polynomial.py
diff options
context:
space:
mode:
authorMatthieu Dartiailh <marul@laposte.net>2013-08-25 16:30:09 +0200
committerMatthieu Dartiailh <marul@laposte.net>2013-08-25 16:30:09 +0200
commit5c7a9f2dddc21849ee272a4ccd59893cefd4b1a9 (patch)
treeece39795a66aa3ac6f57d1b62cbfdd4f0e5466bd /numpy/lib/polynomial.py
parent266a1d1129ccb3328e9319db2451460b7293f681 (diff)
downloadnumpy-5c7a9f2dddc21849ee272a4ccd59893cefd4b1a9.tar.gz
Small correction in the docstring of polyfit. As mentionned in Issue 3640, the notes were wrong in the order of the index for p.
Diffstat (limited to 'numpy/lib/polynomial.py')
-rw-r--r--numpy/lib/polynomial.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/numpy/lib/polynomial.py b/numpy/lib/polynomial.py
index 48a012c9c..49b6b0a0b 100644
--- a/numpy/lib/polynomial.py
+++ b/numpy/lib/polynomial.py
@@ -470,10 +470,10 @@ def polyfit(x, y, deg, rcond=None, full=False, w=None, cov=False):
in the equations::
- x[0]**n * p[n] + ... + x[0] * p[1] + p[0] = y[0]
- x[1]**n * p[n] + ... + x[1] * p[1] + p[0] = y[1]
+ x[0]**n * p[0] + ... + x[0] * p[n-1] + p[n] = y[0]
+ x[1]**n * p[0] + ... + x[1] * p[n-1] + p[n] = y[1]
...
- x[k]**n * p[n] + ... + x[k] * p[1] + p[0] = y[k]
+ x[k]**n * p[0] + ... + x[k] * p[n-1] + p[n] = y[k]
The coefficient matrix of the coefficients `p` is a Vandermonde matrix.