You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Division of two Hist1Ds currently crashes. It works with a small modification
--- a/src/arithmatics.jl+++ b/src/arithmatics.jl@@ -36,8 +36,8 @@ for T in (:Hist1D,)
_f(counts) = any(x -> x<0, counts)
(_f(h1.hist.weights) || _f(h2.hist.weights)) && error("Can't do / when bin count is negative")
_hist = /(h1.hist, h2.hist)
- _sumw2 = h1.sumw2 / (h2.hist.weights .^ 2) +- (sqrt.(h2.sumw2) * h1.hist.weights / (h2.hist.weights .^ 2)) .^ 2+ _sumw2 = @. h1.sumw2 / (h2.hist.weights ^ 2) ++ (sqrt(h2.sumw2) * h1.hist.weights / (h2.hist.weights ^ 2)) ^ 2
($T)(_hist, _sumw2)
end
Though the output _sumw2 is a bunch of zeros if h1 and h2 are filled without weights. Maybe there needs to be a check inside here which "materializes" each of the sumw2s (gaussian/sqrt by default) before doing the error propagation?
The text was updated successfully, but these errors were encountered:
Division of two
Hist1D
s currently crashes. It works with a small modificationThough the output
_sumw2
is a bunch of zeros ifh1
andh2
are filled without weights. Maybe there needs to be a check inside here which "materializes" each of thesumw2
s (gaussian/sqrt by default) before doing the error propagation?The text was updated successfully, but these errors were encountered: