summaryrefslogtreecommitdiff
path: root/numpy/polynomial/_polybase.py
diff options
context:
space:
mode:
authorCharles Harris <charlesr.harris@gmail.com>2016-01-18 12:09:41 -0700
committerCharles Harris <charlesr.harris@gmail.com>2016-01-19 09:40:43 -0700
commit48596210faa134149f7bd4a1a82a665e02bb8104 (patch)
tree6c7fee49a6e0ca8ec970c9dafa02d724dc3518e7 /numpy/polynomial/_polybase.py
parentaa824670cf6ad21c2f921856ba4eec00781347fe (diff)
downloadnumpy-48596210faa134149f7bd4a1a82a665e02bb8104.tar.gz
MAINT: Refactor polynomial leastsquares fits.
* Rewrite the documentation for `deg`. * Check that the passed degrees are int and raise if not. * Do not accept `deg` arguments that do not convert as 0-D or 1-D. * Sort passed degree terms for repeatability.
Diffstat (limited to 'numpy/polynomial/_polybase.py')
-rw-r--r--numpy/polynomial/_polybase.py13
1 files changed, 5 insertions, 8 deletions
diff --git a/numpy/polynomial/_polybase.py b/numpy/polynomial/_polybase.py
index 37eb59f03..6fa72b6f9 100644
--- a/numpy/polynomial/_polybase.py
+++ b/numpy/polynomial/_polybase.py
@@ -739,14 +739,11 @@ class ABCPolyBase(object):
y-coordinates of the sample points. Several data sets of sample
points sharing the same x-coordinates can be fitted at once by
passing in a 2D-array that contains one dataset per column.
- deg : int or array_like
- Degree of the fitting polynomial. If `deg` is a single integer
- all terms up to and including the `deg`'th term are included.
- `deg` may alternatively be a list or array specifying which
- terms in the Legendre expansion to include in the fit.
-
- .. versionchanged:: 1.11.0
- `deg` may be a list specifying which terms to fit
+ deg : int or 1-D array_like
+ Degree(s) of the fitting polynomials. If `deg` is a single integer
+ all terms up to and including the `deg`'th term are included in the
+ fit. For Numpy versions >= 1.11 a list of integers specifying the
+ degrees of the terms to include may be used instead.
domain : {None, [beg, end], []}, optional
Domain to use for the returned series. If ``None``,
then a minimal domain that covers the points `x` is chosen. If