-
Notifications
You must be signed in to change notification settings - Fork 194
Open
Labels
Description
julia> using StatsBase
julia> fit(Histogram, [1, 1, 2])
Histogram{Int64,1,Tuple{StepRangeLen{Float64,Base.TwicePrecision{Float64},Base.TwicePrecision{Float64}}}}
edges:
1.0:0.5:2.5
weights: [2, 0, 1]
closed: left
isdensity: false
julia> fit(Histogram, skipmissing([1, 1, 2]))
ERROR: MethodError: no method matching fit(::Type{Histogram{Int64,N,E} where E where N}, ::Base.SkipMissing{Array{Int64,1}})
There is nothing about fitting a histogram that requires the array interface.
If there is a concern about working with weights, there is skipmissings in Missings.jl which allows you to sync up iterators with missing values.