From fc7afe0f14e31aa34e459952e4728bb4ec20daca Mon Sep 17 00:00:00 2001 From: Charles Harris Date: Sun, 23 May 2010 22:02:13 +0000 Subject: CHG: Use [] instead of 'default' to specify the default domain in Chebyshev.fit and Polynomial.fit. Document the change from numpy 1.4.x. --- numpy/polynomial/polytemplate.py | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'numpy/polynomial/polytemplate.py') diff --git a/numpy/polynomial/polytemplate.py b/numpy/polynomial/polytemplate.py index 706f22c2d..2a57a517f 100644 --- a/numpy/polynomial/polytemplate.py +++ b/numpy/polynomial/polytemplate.py @@ -565,11 +565,12 @@ class $name(pu.PolyBase) : passing in a 2D-array that contains one dataset per column. deg : int Degree of the fitting polynomial - domain : {None, [beg, end], 'default'}, optional + domain : {None, [], [beg, end]}, optional Domain to use for the returned $name instance. If ``None``, then a minimal domain that covers the points `x` is chosen. - If ``'default'`` the default domain ``$domain`` is used. The - default value is ``None``. + If ``[]`` the default domain ``$domain`` is used. The + default value is $domain in numpy 1.4.x and ``None`` in + numpy 2.0.0. The keyword value ``[]`` was added in numpy 2.0.0. rcond : float, optional Relative condition number of the fit. Singular values smaller than this relative to the largest singular value will be @@ -601,7 +602,7 @@ class $name(pu.PolyBase) : """ if domain is None : domain = pu.getdomain(x) - elif domain == 'default' : + elif domain == [] : domain = $domain xnew = pu.mapdomain(x, domain, $domain) res = ${nick}fit(xnew, y, deg, rcond=None, full=full) -- cgit v1.2.1