From 5c7a9f2dddc21849ee272a4ccd59893cefd4b1a9 Mon Sep 17 00:00:00 2001 From: Matthieu Dartiailh Date: Sun, 25 Aug 2013 16:30:09 +0200 Subject: Small correction in the docstring of polyfit. As mentionned in Issue 3640, the notes were wrong in the order of the index for p. --- numpy/lib/polynomial.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'numpy/lib') 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. -- cgit v1.2.1