StatsBase.jl icon indicating copy to clipboard operation
StatsBase.jl copied to clipboard

`proportionmap` should accept any iterator

Open cossio opened this issue 3 years ago • 0 comments

julia> x = [1, 2, 3]
3-element Array{Int64,1}:
 1
 2
 3

julia> proportionmap(skipmissing(x))
ERROR: MethodError: no method matching proportionmap(::Base.SkipMissing{Vector{Int64}})
Closest candidates are:
  proportionmap(::AbstractArray) at ~/.julia/packages/StatsBase/XgjIN/src/counts.jl:455
  proportionmap(::AbstractArray, ::AbstractWeights) at ~/.julia/packages/StatsBase/XgjIN/src/counts.jl:456
Stacktrace:
 [1] top-level scope
   @ REPL[4]:1

Ref. https://github.com/JuliaStats/StatsBase.jl/issues/581 for countmap.

cossio avatar Dec 03 '22 23:12 cossio