Skip to content

Commit

Permalink
widen some methods
Browse files Browse the repository at this point in the history
  • Loading branch information
joshday committed Feb 18, 2018
1 parent 7182228 commit 0e57802
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/OnlineStatsBase.jl
Original file line number Diff line number Diff line change
Expand Up @@ -59,10 +59,10 @@ end
Base.copy(o::OnlineStat) = deepcopy(o)

#-----------------------------------------------------------------------# merge
function Base.merge!(o::T, o2::T, γ::Float64) where {T<:OnlineStat}
function Base.merge!(o::OnlineStat, o2::OnlineStat, γ)
warn("Merging not well-defined for $(typeof(o)). No merging occurred.")
end
Base.merge(o::T, o2::T, γ::Float64) where {T<:OnlineStat} = merge!(copy(o), o2, γ)
Base.merge(o::OnlineStat, o2::OnlineStat, γ::Number) = merge!(copy(o), o2, γ)


#-----------------------------------------------------------------------# Weight
Expand Down

0 comments on commit 0e57802

Please sign in to comment.