Closed schlichtanders closed 3 months ago
Finally clearing out some old GH notifications...sorry for the delay.
There are a set of ideas swirling around in my head for "OnlineStats 2.0", one of which solves this. My temporary solution is below:
In OnlineStatsBase master, I've removed the fallback _merge!
method (which just threw an error), so that this works:
julia> is_mergeable(o::T) where {T <: OnlineStat} = hasmethod(OnlineStats._merge!, Tuple{T,T})
julia> is_mergeable(Mean())
# true
Julia> is_mergeable(CircBuff(Int,5))
# false
I've added is_mergeable
to OnlineStatsBase (unexported).
I am trying to use OnlineStats.jl with DTable.jl and while it is a great combination, I often run into the error that
merge
is not defined for my Monoid of choice.It would be great if there could be an easy list which Monoids also support
merge
.EDIT: As a workaround for now, ~is there some programmatic way to find this list?~ I found the following: