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

Generalize NA to take na predicate as argument (not just isnan) #172

Merged
merged 3 commits into from
Jun 16, 2020

Conversation

yha
Copy link
Contributor

@yha yha commented Jun 9, 2020

Useful for filtering SVector or GeometryTypes.Point arrays with NA(x->any(isnan,x)).
May be also useful to do NA(ismissing) in the future, but imfilter with missings doesn't work yet for other reasons.

I removed the line out[nanflag] .= nan(T), which may be breaking (changes the behavior of plain NA()). I'm not sure why it was there; seems to me like a bug.

Copy link
Member

@timholy timholy left a comment

Choose a reason for hiding this comment

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

Very nice!

@timholy
Copy link
Member

timholy commented Jun 16, 2020

Let's re-run this now on top of #174.

@timholy timholy closed this Jun 16, 2020
@timholy timholy reopened this Jun 16, 2020
@codecov
Copy link

codecov bot commented Jun 16, 2020

Codecov Report

Merging #172 into master will decrease coverage by 0.75%.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #172      +/-   ##
==========================================
- Coverage   91.65%   90.90%   -0.76%     
==========================================
  Files           9        9              
  Lines        1222     1231       +9     
==========================================
- Hits         1120     1119       -1     
- Misses        102      112      +10     
Impacted Files Coverage Δ
src/border.jl 94.90% <100.00%> (-0.61%) ⬇️
src/imfilter.jl 90.40% <100.00%> (-0.41%) ⬇️
src/ImageFiltering.jl 76.19% <0.00%> (-3.81%) ⬇️
src/mapwindow.jl 85.09% <0.00%> (-2.10%) ⬇️
src/borderarray.jl 89.70% <0.00%> (-1.34%) ⬇️
src/kernel.jl 100.00% <0.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update aada1d2...d9c06e5. Read the comment docs.

@timholy timholy merged commit 3d9a7ab into JuliaImages:master Jun 16, 2020
@yha yha deleted the na-generalized branch June 16, 2020 14:49
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