makepath / xarray-spatial

Raster-based Spatial Analytics for Python
https://xarray-spatial.readthedocs.io/
MIT License
828 stars 84 forks source link

classify.binary: handle NaNs and infinite values #763

Closed thuydotm closed 1 year ago

thuydotm commented 1 year ago

Fixes #757

To be consistent with all other tools in classify module, this PR changes the way classify.binary() treats NaNs and infinite values. It now considers those values as outliers and classify them as NaNs instead of 0s as of previously.

codecov-commenter commented 1 year ago

Codecov Report

Base: 79.90% // Head: 79.94% // Increases project coverage by +0.03% :tada:

Coverage data is based on head (cf3627e) compared to base (e47c278). Patch coverage: 66.66% of modified lines in pull request are covered.

:mega: This organization is not using Codecov’s GitHub App Integration. We recommend you install it so Codecov can continue to function properly for your repositories. Learn more

Additional details and impacted files ```diff @@ Coverage Diff @@ ## master #763 +/- ## ========================================== + Coverage 79.90% 79.94% +0.03% ========================================== Files 19 19 Lines 4175 4178 +3 ========================================== + Hits 3336 3340 +4 + Misses 839 838 -1 ``` | [Impacted Files](https://codecov.io/gh/makepath/xarray-spatial/pull/763?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=makepath) | Coverage Δ | | |---|---|---| | [xrspatial/classify.py](https://codecov.io/gh/makepath/xarray-spatial/pull/763?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=makepath#diff-eHJzcGF0aWFsL2NsYXNzaWZ5LnB5) | `78.67% <66.66%> (+0.23%)` | :arrow_up: | | [xrspatial/utils.py](https://codecov.io/gh/makepath/xarray-spatial/pull/763?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=makepath#diff-eHJzcGF0aWFsL3V0aWxzLnB5) | `63.01% <0.00%> (-1.37%)` | :arrow_down: | | [xrspatial/proximity.py](https://codecov.io/gh/makepath/xarray-spatial/pull/763?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=makepath#diff-eHJzcGF0aWFsL3Byb3hpbWl0eS5weQ==) | `97.99% <0.00%> (+1.20%)` | :arrow_up: | Help us with your feedback. Take ten seconds to tell us [how you rate us](https://about.codecov.io/nps?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=makepath). Have a feature suggestion? [Share it here.](https://app.codecov.io/gh/feedback/?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=makepath)

:umbrella: View full report at Codecov.
:loudspeaker: Do you have feedback about the report comment? Let us know in this issue.