Skip to content

Commit 5a85a30

Browse files
authored
Fix histogram tests on Julia nightlies (#656)
Generators are not longer allows in generated functions as they make them unpure.
1 parent a89554b commit 5a85a30

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/hist.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -461,7 +461,7 @@ arrays appropriately. See description of `normalize` for details. Returns `h`.
461461
if mode == :pdf || mode == :density
462462
# Divide weights by bin volume, for :pdf also divide by sum of weights
463463
SumT = norm_type(h)
464-
vs_0 = (mode == :pdf) ? sum(SumT(x) for x in weights) : one(SumT)
464+
vs_0 = (mode == :pdf) ? sum(SumT, weights) : one(SumT)
465465
@inbounds @nloops $N i weights d->(vs_{$N-d+1} = vs_{$N-d} * _edge_binvolume(SumT, edges[d], i_d)) begin
466466
(@nref $N weights i) /= $(Symbol("vs_$N"))
467467
for A in aux_weights

0 commit comments

Comments
 (0)