-
Notifications
You must be signed in to change notification settings - Fork 112
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
Interpolating over a vector of non-integer values raises "ERROR: InexactError()" #106
Comments
@btengels great to see you here! The only reason is that it hasn't been implemented. For gridded interpolation there is a significant efficiency gain if we can cache the indices. The gain isn't as large with with cardinal ("vanilla") B-splines. I have plans to implement vector evaluation for cardinal B-splines because you can actually get decent speedups if you make certain assumptions. One assumption is that you assume the points you want to evaluate at are sorted or otherwise close to one another. Then you can avoid a whole binary search across the vector by starting with a guess for the index at point |
With a So, someone presumably needs to implement the vectorization within Interpolations. It should be pretty simple, e.g., the one-liner
work for 2d. But obviously it has to be done for arbitrary dimensionality (using generated functions, presumably). |
If it can be done, I'd really like to "force" the vectorized fallbacks in Julia to become compatible with this* instead of implementing it here. For one thing, the code here is going to be very similar to the one in base Julia, and for another I think this package is a good use case for testing that the fallbacks become flexible enough to actually be useful. There might be some perfomance optimizations for B-splines that are still possible after that, but I doubt that any of them are worth the added complexity, and I definitely think we should wait with implementing until we can measure that it's needed. In the meantime, @btengels, I just do *) although it's a little over my head to implement it, so I'm just hoping @timholy and @ mbauman (who doesn't need to be pinged here...) will sort it out 😄 For reference, see also #24, #54, #55, #96 for other discussions related to vector-valued evaluation. |
We will. But it will only arrive in julia 0.5. |
Not supporting |
Closing this for housekeeping - feel free to re-open if there is more to discuss here. |
Is there a reason why I can vectorize interpolation when using a Gridded Interpolation object and not a plain vanilla B-spline?
The interpolation call gives me the following error:
Great project btw. I hope to help out somehow though I'm not really a julia expert.
The text was updated successfully, but these errors were encountered: