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

feat: add a map and map_ref method #61

Merged
merged 2 commits into from
Dec 19, 2024

Conversation

henryiii
Copy link
Contributor

@henryiii henryiii commented Dec 16, 2024

This adds a way to apply a function (possibly changing the type) and produce a new Grid. For example, given a grid, you could produce a mask by applying a function producing a boolean (examples in docs).

Copy link
Owner

@becheran becheran left a comment

Choose a reason for hiding this comment

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

Looks really useful. Thanks for adding the feature!

Just adding at least one test for each function would be great. Otherwise no issues.

@henryiii
Copy link
Contributor Author

I added doctests for each, I guess you mean unit tests too? I can do that.

@henryiii
Copy link
Contributor Author

Done! Let me know if you want anything else, more testing, etc.

@becheran becheran merged commit 8c09cca into becheran:master Dec 19, 2024
3 checks passed
@becheran
Copy link
Owner

I forgot about the doctests, which you already added. Would have been enough, I just did not realize them.

=> Thanks! Merged

@henryiii
Copy link
Contributor Author

The methods around it also had regular tests (and regular tests are faster), so seemed reasonable to have those too. :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants