-
Notifications
You must be signed in to change notification settings - Fork 114
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
Pytensor-native interpolation functions #1141
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ricardoV94
reviewed
Dec 28, 2024
jessegrabowski
force-pushed
the
interp1d
branch
from
December 28, 2024 22:09
9313e6d
to
d2eb992
Compare
jessegrabowski
force-pushed
the
interp1d
branch
from
December 28, 2024 22:20
d2eb992
to
0e03119
Compare
jessegrabowski
force-pushed
the
interp1d
branch
from
December 28, 2024 22:32
a0c02d0
to
b7a23d7
Compare
ricardoV94
approved these changes
Dec 28, 2024
Can you add labels to the PR? |
jessegrabowski
added
enhancement
New feature or request
NumPy compatibility
SciPy compatibility
labels
Dec 28, 2024
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #1141 +/- ##
==========================================
+ Coverage 82.12% 82.14% +0.02%
==========================================
Files 185 186 +1
Lines 48130 48210 +80
Branches 8669 8678 +9
==========================================
+ Hits 39527 39603 +76
- Misses 6438 6440 +2
- Partials 2165 2167 +2
|
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
Adds a new file,
interpolation.py
. Objective is to match a useful subset ofscipy.interpolate
. So far I have 1d interpolation with different strategies. Example:Everything is composed of pytensor primitives, so it ought to compile to JAX/NUMBA without additional changes. It seems there are so bugs though, so they don't work yet. Specifically, NUMBA raises the following error:
And it also gives a warning about a missing Supervisor, which might or might not be related.
In addition to this more feature rich
interpolate1d
API, I also addedpt.interp
, which matches the numpy signature 1:1:I figure I'll also do a function that do polynomial interpolation (fit via least-squares). The holy grail here is BSplines, but how to do that is somewhat beyond me at the moment. I think just getting these simple methods into the library would be useful, then we can open issues to add more interesting methods.
Related Issue
Interpolated
not supported in JAX/Numba backends pymc#6838Checklist
Type of change
📚 Documentation preview 📚: https://pytensor--1141.org.readthedocs.build/en/1141/