Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 2 additions & 9 deletions src/io.jl
Original file line number Diff line number Diff line change
Expand Up @@ -13,15 +13,8 @@ function par2ystr(par::AbstractParametersVector, txt::Vector{String}; show_info:
end
end

function equals_with_missing(a, b)
if ismissing(a) && ismissing(b)
return true
elseif ismissing(a) || ismissing(b)
return false
else
return a == b
end
end
# isequal treats missing==missing and NaN==NaN as true, unlike ==
equals_with_missing(a, b) = isequal(a, b)

function YAML._print(io::IO, value::Missing, level::Int=0, ignore_level::Bool=false)
return println(io, "~")
Expand Down
2 changes: 1 addition & 1 deletion src/utils.jl
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ function Base.diff(p1::AbstractParametersVector, p2::AbstractParametersVector)
end
for key in commonkeys
v1 = p1[key]
v2 = p1[key]
v2 = p2[key]
if typeof(v1) !== typeof(v2)
error("$key is of different type")
elseif typeof(v1) <: AbstractParameters
Expand Down
Loading