Skip to content
This repository has been archived by the owner on Dec 11, 2022. It is now read-only.

Commit

Permalink
🔥 remove isnothing to make @gabrieldansereau happy 😄
Browse files Browse the repository at this point in the history
  • Loading branch information
tpoisot committed Feb 10, 2021
1 parent 8b3df35 commit aa83d19
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 13 deletions.
1 change: 0 additions & 1 deletion docs/src/man/overloads.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ directly, and also allow to set and get values using the geographic coordinates
convert
copy
collect
isnothing
eltype
size
stride
Expand Down
11 changes: 0 additions & 11 deletions src/lib/overloads.jl
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ import Base: copy
import Base: eltype
import Base: convert
import Base: collect
import Base: isnothing
import Base.Broadcast: broadcast
import Base: hcat
import Base: vcat
Expand Down Expand Up @@ -303,16 +302,6 @@ function Base.collect(l::T) where {T <: SimpleSDMLayer}
return convert(Vector{eltype(l)}, v)
end

"""
Base.isnothing(l::T) where {T <: SimpleSDMLayer}
Returns a grid the same size as the layer with the positions containing
`nothing` set to true.
"""
function Base.isnothing(l::T) where {T <: SimpleSDMLayer}
return isnothing.(l.grid)
end

"""
Base.vcat(l1::T, l2::T) where {T <: SimpleSDMLayers}
Expand Down
2 changes: 1 addition & 1 deletion src/recipes/recipes.jl
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ test 2
seriestype --> :scatter
if get(plotattributes, :seriestype, :scatter) in [:scatter, :histogram2d]
SimpleSDMLayers._layers_are_compatible(l1, l2)
valid_i = findall(.!isnothing(l1) .& .!isnothing(l2))
valid_i = findall(.!isnothing.(l1.grid) .& .!isnothing.(l2.grid))
l1.grid[valid_i], l2.grid[valid_i]
end
end

0 comments on commit aa83d19

Please sign in to comment.