Skip to content

Commit

Permalink
tests for masked_value=NaN added
Browse files Browse the repository at this point in the history
  • Loading branch information
milankl committed Mar 29, 2022
1 parent b21f6f3 commit d0fe676
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions test/information.jl
Original file line number Diff line number Diff line change
Expand Up @@ -206,5 +206,12 @@ end
round!(A,1)
mask = A .== masked_value
@test bitinformation(A,mask) == bitinformation(A;masked_value)

# check that masked_value=NaN also works
A[:,2] .= NaN # put some NaNs somewhere
mask = BitArray(undef,size(A)...) # create corresponding mask
fill!(mask,false)
mask[:,2] = true
@test bitinformation(A,mask) == bitinformation(A;masked_value=convert(T,NaN))
end
end

0 comments on commit d0fe676

Please sign in to comment.