-
Notifications
You must be signed in to change notification settings - Fork 113
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
Hessian of CubicSplineInterpolation broken? #268
Comments
The stackoverflow is definitely bad, but I don't think we have hessians defined for extrapolation objects yet. If you're interested in adding it, check out Interpolations.jl/src/extrapolation/extrapolation.jl Lines 57 to 68 in 21c1b0e
Another tip: this may have just been to demonstrate the bug, but when the knots are |
Thanks, @timholy. I didn't mean to use the interpolant for extrapolation, I used the shorthand "CubicSplineInterpolation" just for convenience. I do need the scaling though. I'll try the handwritten interpolant thing and see if that works. |
As I don't need the extrapolation, I was hoping that the
again results in a stack overflow error (or Atom to just hang):
However, the unscaled interpolant works fine!
I'll try to see if I can fix this, but I hope this provides some info for the experts on where the error might be. |
Prob. mimic Interpolations.jl/src/scaling/scaling.jl Lines 103 to 118 in 21c1b0e
|
I guess that this self-call doesn't resolve itself: Interpolations.jl/src/Interpolations.jl Lines 370 to 372 in 21c1b0e
and never gets to where the actual Hessian calculation is done? I assume for that to happen, one would have to pass the interpolant underlying the scaled interpolant, something like |
If you just mimic the call for |
I was working on it today for quite a while, and found the scaling to be not that easy... at least when you want to avoid allocating (sub-)arrays and make sure the result is truly symmetric. I finally got a solution, which I believe/hope to be numerically correct, satisfies the two criteria, but doesn’t infer the type unfortunately... I’ll post a PR tomorrow for review and comments. |
The following
throws
The text was updated successfully, but these errors were encountered: