Skip to content

Commit 38ef85f

Browse files
committed
Adapt to API changes in StatsBase v0.28
Weighed mean takes `dims` keyword argument now.
1 parent af70b76 commit 38ef85f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/statsbase_support.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
Base.sum(X::AbstractVectorOfSimilarArrays{T,M}, w::StatsBase.AbstractWeights) where {T,M} = sum(flatview(X), w, M + 1)
55

66
Statistics.mean(X::AbstractVectorOfSimilarArrays{T,M}, w::StatsBase.AbstractWeights) where {T,M} =
7-
mean(flatview(X), w, M + 1)
7+
mean(flatview(X), w, dims = M + 1)
88

99
Statistics.var(X::AbstractVectorOfSimilarArrays{T,M}, w::StatsBase.AbstractWeights; corrected::Bool = true) where {T,M} =
1010
var(flatview(X), w, M + 1; corrected = corrected)

0 commit comments

Comments
 (0)