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

Fix bugs and write tests for Raster.value_at_coords() #339

Merged
merged 9 commits into from
Feb 9, 2023

Conversation

rhugonnet
Copy link
Contributor

@rhugonnet rhugonnet commented Jan 21, 2023

This PR adds tests for the value_at_coords function, adds the functionality of passing an array-like object of coordinates, and fixes minors bugs.

It looks like more changes than there actually is in the "Files changed". Owing to shifting blocks of code in value_at_coords to be either in or out of the loop (added for array-like).

There's also a setup bug with isort that they recommend to fix by upgrading to 5.12.0 (will need the same in xDEM): moved to #343.

Resolves #324
Resolves #245

@rhugonnet rhugonnet changed the title Fix bugs and write tests for Raster.value_to_coords() Fix bugs and write tests for Raster.value_at_coords() Jan 21, 2023
tests/test_georaster.py Outdated Show resolved Hide resolved
Copy link
Member

@adehecq adehecq left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for updating this !
Just see my comments about avoiding some operations within the loop.

@rhugonnet rhugonnet merged commit 9eb1bca into GlacioHack:main Feb 9, 2023
@rhugonnet rhugonnet deleted the tests_value_at_coords branch February 9, 2023 21:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants