-
Notifications
You must be signed in to change notification settings - Fork 42
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
Idea: Xarray interface #334
Comments
On the other hand, if the Array API specification gets adopted in the Python world, that might be the more general choice: https://data-apis.org/array-api/latest/API_specification/index.html |
Interesting idea! In fact, we already try to do something similar to offering this array api with out 'band math' functionality. But there the user has to mix some openEO specific things with other operations.
It would certainly help our users (and us) if we can simply implement a well documented or even standardized API.
|
Yes that would make things even easier! If OpenEO datacubes implement (a part of) the Array API Standard, then many things should already work seamlessly through Xarray (linking a discussion about testing the integration of any Array class with Xarray: pydata/xarray#6894). For OpenEO datacube integration with Xarray, there is a few more things we could consider beyond the Array API:
|
Interesting idea indeed. Could be valuable to align with some kind of standardized array/cube API . |
@benbovy maybe you could be interest in the client side processing activity we are working on. The main idea consist in allowing the user to process data with openEO processes locally and not only in the cloud, using the xArray implementations of the openEO processes. |
I stumbled upon the Open-EO project a few times and find it very interesting. As a Xarray developer I've been wondering whether it would benefit from an Xarray interface.
I see that Xarray is already used here, but as far as I understand it is for defining user defined functions. My suggestion is rather interacting with Open-EO directly via the Xarray API, which may be complementary to using Xarray for UDFs.
New Xarray developments are going towards very flexible containers, with the recent addition of IO backends, alternative array backends (
cupy
,sparse
, pytorch...), alternative parallel execution backends, flexible indexes (pydata/xarray#7041, https://github.com/pydata/xarray/projects/1), and accessors.Leveraging Xarray's flexibility, I can imagine something like this:
I think that such an Xarray interface could be built on top of this client library (perhaps in another repository). To make things easier, ideally
openeo.DataCube
would need to implement some duck array API.The main advantage is that users can interact with OpenEO using an API they are already familiar with (assuming they already know about Xarray). They can also further process the data (results) locally using the same interface.
This is a very rough idea that I just wanted to share here, though. I'm pretty sure that providing an Xarray interface would represent quite some work with lots of challenging issues (and likely things to address in Xarray). I'd be happy to read what you think about this idea! (Sorry, I'm not sure if it is the right place here for discussing this)
The text was updated successfully, but these errors were encountered: