-
-
Notifications
You must be signed in to change notification settings - Fork 5.1k
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
make_interp_spline bc_type incorrect input interpretation #8911
Comments
Not quite.
This way, to get the clamped cubic spline, you do
Somewhat embarassingly, the explicit equivalences in the docs were wrong, thus adding to the confusion. gh-8914 fixes it. On a side note, one may argue that the whole thing is confusing. Which it is, because of this tuple of iterables of pairs thingy. The complexity is needed to support a general case (e.g., a 5th order spine needs four boundary conditions). However for a common case of a cubic spline with exactly two boundary conditions at each side of the interval, this can be viewed as extraneous, and the OP example looks more natural (and is consistent with In principle, we may special case a common need for a cubic with |
I'd say a special case doesn't make things better here, it'll be even more messy to explain things well. I'd be -0.5. The exception is |
Thanks Ralf. gh-8919 attempts to improve error messages. |
<<Please describe the issue in detail here, and for bug reports fill in the fields below.>>
bc_type crashes when it takes two 2-tuples for constraining the ends of the trajectory. For example, for zero 1st-derivatives (clamped), the input should be
bc_type=((1, 0.0), (1, 0.0))
.One possible fix is to change
in line 682 of _bsplines.py to
and
in line 690 of _bsplines.py to
This way the input is interpreted without error.
Reproducing code example:
Error message:
Scipy/Numpy/Python version information:
The text was updated successfully, but these errors were encountered: