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

Add Mask subclass #350

Closed
wants to merge 8 commits into from
Closed

Add Mask subclass #350

wants to merge 8 commits into from

Conversation

rhugonnet
Copy link
Member

@rhugonnet rhugonnet commented Feb 7, 2023

This PR:

  • Adds the Mask class,
  • Casts any boolean array passed to Raster.from_array() into a Mask,
  • Makes __array_function__ interface compatible with logical functions, automatically cast into a Mask
  • Changes output of Vector.create_mask() and rasterize() with certain parameters to Mask,
  • Changes __eq__ into raster_equal().

Write new tests for all.

Resolves #316

@rhugonnet
Copy link
Member Author

Ready for review, just need to make mypy happy and it's all done.

@rhugonnet rhugonnet requested a review from adehecq February 8, 2023 01:56
@rhugonnet rhugonnet mentioned this pull request Feb 9, 2023
@rhugonnet
Copy link
Member Author

Closing this, as it had to be developed directly in #351. See there for the final Mask features and tests.

@rhugonnet rhugonnet closed this Mar 9, 2023
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.

Decide of the naming of strict or relaxed equality (__eq__ or raster_equal?)
1 participant