From 3bc03ae143b5321abf5ab2fd6676286d4c090716 Mon Sep 17 00:00:00 2001 From: Joseph Fox-Rabinovitz Date: Fri, 26 Aug 2016 12:21:02 -0400 Subject: DOC: Fixed documented dimension of return value The first dimension of the return value depends on the degree of the polynomial, not the number of elements being used in the fit. --- numpy/lib/polynomial.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'numpy/lib/polynomial.py') diff --git a/numpy/lib/polynomial.py b/numpy/lib/polynomial.py index d96b8969f..d178ba4b3 100644 --- a/numpy/lib/polynomial.py +++ b/numpy/lib/polynomial.py @@ -431,7 +431,7 @@ def polyfit(x, y, deg, rcond=None, full=False, w=None, cov=False): Returns ------- - p : ndarray, shape (M,) or (M, K) + p : ndarray, shape (deg + 1,) or (deg + 1, K) Polynomial coefficients, highest power first. If `y` was 2-D, the coefficients for `k`-th data set are in ``p[:,k]``. -- cgit v1.2.1