Skip to content
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

Support xarray coordinates and data variables in verde.get_region #304

Open
leouieda opened this issue Dec 1, 2020 · 0 comments
Open

Support xarray coordinates and data variables in verde.get_region #304

leouieda opened this issue Dec 1, 2020 · 0 comments
Labels
enhancement Idea or request for a new feature good first issue Good for newcomers (doesn’t require deep knowledge of the project)
Milestone

Comments

@leouieda
Copy link
Member

leouieda commented Dec 1, 2020

Description of the desired feature

The function uses np.min and np.max to get the bounding region of the given set of coordinates. This doesn't work if the coordinates are coming from xarray because the min and max functions return an array instead of a float. This causes non-obvious failures later on in the code when we try to use the region that came from this function.

To have this function behave properly for those inputs, it might need to check if the input or output has a .values attribute (identifying the xarray object or something like it) and use that instead of the variable. It could be done on the input or on the output (which might be the best option).

Are you willing to help implement and maintain this feature? Yes

@leouieda leouieda added enhancement Idea or request for a new feature help wanted good first issue Good for newcomers (doesn’t require deep knowledge of the project) labels Dec 1, 2020
@leouieda leouieda added this to the v2.0.0 milestone Apr 8, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Idea or request for a new feature good first issue Good for newcomers (doesn’t require deep knowledge of the project)
Projects
None yet
Development

No branches or pull requests

1 participant