You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I get NaN as the result of interpolation when the number of samples is large (e.g., N = 700). I tried to reproduce the problem with a simpler set of samples, but I couldn't, so I copy and paste the problematic sample points and values below; sorry for the inconvenience.
julia> s =Spline1D(xs, ys);
julia> s(xs)
700-element Vector{Float64}:
NaN
NaN
NaN
⋮
NaN
NaN
NaN
Note that I am evaluating the interpolator at the sample points, so the interpolation values should be sample values, not NaNs.
I'm curious why this is happening, and if there is a workaround. Strangely, if I reduce the length of the samples, e.g., to 600, the problem disappears:
julia> s =Spline1D(xs[1:600], ys[1:600]);
julia> s(xs[1:600]) ≈ ys[1:600]
true
The text was updated successfully, but these errors were encountered:
I get NaN as the result of interpolation when the number of samples is large (e.g.,
N = 700
). I tried to reproduce the problem with a simpler set of samples, but I couldn't, so I copy and paste the problematic sample points and values below; sorry for the inconvenience.The number of samples is 700:
Then, I get the following result:
Note that I am evaluating the interpolator at the sample points, so the interpolation values should be sample values, not
NaN
s.I'm curious why this is happening, and if there is a workaround. Strangely, if I reduce the length of the samples, e.g., to 600, the problem disappears:
The text was updated successfully, but these errors were encountered: