Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DOC: Inconsistency in the definition of default values in the model UnivariateSpline #14093

Closed
Anselmoo opened this issue May 20, 2021 · 0 comments · Fixed by #14094
Closed
Labels
Documentation Issues related to the SciPy documentation. Also check https://github.com/scipy/scipy.org scipy.interpolate
Milestone

Comments

@Anselmoo
Copy link
Contributor

My issue is about inconsistency in the definition of default values in the model UnivariateSpline
ttps://github.com/scipy/scipy/blob/4ec4ab8d6ccc1cdb34b84fdcb66fde2cc0210dbf/scipy/interpolate/fitpack2.py#L71

Sometimes the default value is defined in brackets (), sometimes at the end of the docstring.

Reproducing code example:

x : (N,) array_like
1-D array of independent input data. Must be increasing;
must be strictly increasing if `s` is 0.
y : (N,) array_like
1-D array of dependent input data, of the same length as `x`.
w : (N,) array_like, optional
Weights for spline fitting. Must be positive. If None (default),
weights are all equal.
bbox : (2,) array_like, optional
2-sequence specifying the boundary of the approximation interval. If
None (default), ``bbox=[x[0], x[-1]]``.
k : int, optional
Degree of the smoothing spline. Must be 1 <= `k` <= 5.
Default is `k` = 3, a cubic spline.
s : float or None, optional
Positive smoothing factor used to choose the number of knots. Number
of knots will be increased until the smoothing condition is satisfied::
sum((w[i] * (y[i]-spl(x[i])))**2, axis=0) <= s
If None (default), ``s = len(w)`` which should be a good value if
``1/w[i]`` is an estimate of the standard deviation of ``y[i]``.
If 0, spline will interpolate through all data points.
ext : int or str, optional
Controls the extrapolation mode for elements
not in the interval defined by the knot sequence.
* if ext=0 or 'extrapolate', return the extrapolated value.
* if ext=1 or 'zeros', return 0
* if ext=2 or 'raise', raise a ValueError
* if ext=3 of 'const', return the boundary value.
The default value is 0.
check_finite : bool, optional
Whether to check that the input arrays contain only finite numbers.
Disabling may give a performance gain, but may result in problems
(crashes, non-termination or non-sensical results) if the inputs
do contain infinities or NaNs.
Default is False.

Scipy/Numpy/Python version information:

Current release: 1.6.3

@AtsushiSakai AtsushiSakai added Documentation Issues related to the SciPy documentation. Also check https://github.com/scipy/scipy.org scipy.interpolate labels May 20, 2021
@tylerjereddy tylerjereddy added this to the 1.7.0 milestone May 21, 2021
@tylerjereddy tylerjereddy changed the title Inconsistency in the definition of default values in the model UnivariateSpline DOC: Inconsistency in the definition of default values in the model UnivariateSpline May 21, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Documentation Issues related to the SciPy documentation. Also check https://github.com/scipy/scipy.org scipy.interpolate
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants