-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
New feature: interp1d #2079
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
Comments
I think Interpolation (and scipy integration) is one of a good extensions of xarray ecosystem. We discussed previously about contribute package/module in #1850 #1288 . I notice that different people have developed almost the same package in parallel, |
If it were not for caching the grid setup, then this would make sense as a built-in xarray method With caching, this feels a little bit beyond the standard xarray data model, but well suited for a companion package. It would be great to start listing these on a doc page, so users can easily find them! @fujiisoup also note @rabernat's xrft package, which has some overlap with your xr-scipy package. |
This functionality sounds similar to
This looks nice. |
Regarding interpolation, this is one of the most common needs of users. I would support adding some sort of basic interpolation directly within xarray. I would eventually like to see multilinear n-dimensional interpolation supported.
xrft is focused quite narrowly on spectral analysis. It is very useful for our research group. But we haven't put much effort into making it widely accessible or comprehensive. I agree that in principle it would be good to merge efforts. However, we say this often about this type of project, but in practice I'm not sure we have the time to really accomplish it. It would take significant developer effort. xr-scipy seems the most mature and well designed of the three packages, so that should probably be the one we focus efforts on if we go that route. |
For my use case slrep caching is critical, as I need to interpolate 20-something curves roughly 4000 times on different points. Changing the application to gather all points from downstream and do one big interpolation would not be feasible as it would kill off my RAM and be very hostile to a distributed environment. |
I am very much in favor of an xarray built-in |
I think this would be a little confusing because then Also, |
As I was dissatisfied with the prototype, I scrapped it and rewrote it mocking the splrep/splev API. However my functions don't wrap around
I built a production-quality version (inclusive of documentation, unit tests, and all the trimmings) at https://github.com/crusaderky/xarray_extras. Happy to discuss moving it to somebody else's module. You still can't have a chunked x. It is possible to implement it with Closing this ticket as I agree this is beyond the scope of the core xarray package. |
I've written a series of wrappers for the 1-dimensional scipy interpolators.
Prototype code and colourful demo plots:
https://gist.github.com/crusaderky/b0aa6b8fdf6e036cb364f6f40476cc67
Features
Design hacks
dask.array.Array
can contain anything and you won't notice until you compute them.Limitations
The text was updated successfully, but these errors were encountered: