-
Notifications
You must be signed in to change notification settings - Fork 194
Open
Labels
Description
When fitting a histogram to data with nbins=2 I get the results corresponding to 3 bins.
Same happens if I pass 0.0:0.5:1.5 and closed=:left instead. I get 3 bins.
julia> h = fit(Histogram, [0,1,0,0,1,1,1,1], nbins=2, closed=:right)
Histogram{Int64,1,Tuple{StepRangeLen{Float64,Base.TwicePrecision{Float64},Base.TwicePrecision{Float64}}}}
edges:
-0.5:0.5:1.0
weights: [3, 0, 5]
closed: right
isdensity: false
julia> h = fit(Histogram, [0,1,0,0,1,1,1,1], nbins=3, closed=:right)
Histogram{Int64,1,Tuple{StepRangeLen{Float64,Base.TwicePrecision{Float64},Base.TwicePrecision{Float64}}}}
edges:
-0.5:0.5:1.0
weights: [3, 0, 5]
closed: right
isdensity: falseI guess this is a bug, otherwise how to avoid this issue?
briochemc