diff options
author | Jonathan Underwood <jonathan.underwood@gmail.com> | 2015-12-03 14:41:00 +0000 |
---|---|---|
committer | Jonathan Underwood <jonathan.underwood@gmail.com> | 2016-01-18 14:26:14 +0000 |
commit | 5f7b1af4e652c2ab631634d9778a3a4015e41ced (patch) | |
tree | 438ab8d8ebe6df55cf50fcaa8f55fe591f133967 /numpy/polynomial/_polybase.py | |
parent | c65093c96746fd5513a648522e105d7df8e8c912 (diff) | |
download | numpy-5f7b1af4e652c2ab631634d9778a3a4015e41ced.tar.gz |
ENH: Allow specification of terms to fit in fit method
Diffstat (limited to 'numpy/polynomial/_polybase.py')
-rw-r--r-- | numpy/polynomial/_polybase.py | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/numpy/polynomial/_polybase.py b/numpy/polynomial/_polybase.py index 41bdf0484..37eb59f03 100644 --- a/numpy/polynomial/_polybase.py +++ b/numpy/polynomial/_polybase.py @@ -739,8 +739,14 @@ 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 - Degree of the fitting polynomial. + 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 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 |