From 422988b3f6f005c178ed2530d6b4612ab9990b5c Mon Sep 17 00:00:00 2001 From: "Michael K. Borregaard" Date: Fri, 13 Oct 2017 12:38:56 +0200 Subject: [PATCH] fix `weights` in `histogram` --- src/recipes.jl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/recipes.jl b/src/recipes.jl index 97352505..8fb582ae 100644 --- a/src/recipes.jl +++ b/src/recipes.jl @@ -550,7 +550,7 @@ function _make_hist{N}(vs::NTuple{N,AbstractVector}, binning; normed = false, we edges = _hist_edges(vs, binning) h = float( weights == nothing ? StatsBase.fit(StatsBase.Histogram, vs, edges, closed = :left) : - StatsBase.fit(StatsBase.Histogram, vs, weights, edges, closed = :left) + StatsBase.fit(StatsBase.Histogram, vs, StatsBase.Weights(weights), edges, closed = :left) ) normalize!(h, mode = _hist_norm_mode(normed)) end