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

coords_to_indices requires iterable #280

Open
jeromaerts opened this issue Dec 6, 2021 · 1 comment
Open

coords_to_indices requires iterable #280

jeromaerts opened this issue Dec 6, 2021 · 1 comment
Labels
enhancement New feature or request good first issue Good for newcomers

Comments

@jeromaerts
Copy link
Member

Based on student feedback:

Can we make it possible to pass non-iterables and iterables to the function coords_to_indices?

def _coords_to_indices(
self, name: str, lat: Iterable[float], lon: Iterable[float]
) -> Iterable[int]:

@BSchilperoort
Copy link
Contributor

This could be addressed by modifying set_value_at_coords so it can take either a float or Interable[float], and turning the floats into a tuple of floats before passing to _coords_to_indices.

https://github.com/eWaterCycle/ewatercycle/blob/a8fe6e577d6696fbe5f66599de4a26dc3dab637c/src/ewatercycle/base/model.py#L213C9-L213C28

@BSchilperoort BSchilperoort added enhancement New feature or request good first issue Good for newcomers labels Mar 28, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

2 participants