Comments (2)
OK, matches ROOT.
julia> using StatsBase
julia> h1 = Hist1D([0.5,1.5,1.5,2.5], Weights(ones(4)), 0:3);
julia> h2 = Hist1D([1.5,2.5,2.5], Weights(ones(3)), 0:3);
julia> (h1/h2).sumw2 |> println
[NaN, 6.0, 0.375]
import ROOT
h1 = ROOT.TH1F("h1", "", 3, 0, 3); h1.Sumw2()
h2 = ROOT.TH1F("h2", "", 3, 0, 3); h2.Sumw2()
for x in [0.5,1.5,1.5,2.5]: h1.Fill(x)
for x in [1.5,2.5,2.5]: h2.Fill(x)
h1.Divide(h2)
print([round(h1.GetBinContent(i), 4) for i in range(1,h1.GetNbinsX()+1)])
# [0.0, 2.0, 0.5]
print([round(h1.GetBinError(i)**2, 4) for i in range(1,h1.GetNbinsX()+1)])
# [0.0, 6.0, 0.375]
from fhist.jl.
Ignore/close this and let's just move the discussion to #8 .
from fhist.jl.
Related Issues (20)
- Overflow behavior HOT 2
- TagBot trigger issue HOT 39
- repr in jupyter notebooks
- Constructor using Dict{Symbol, Key} from UnROOT's hist HOT 5
- Plotting example using FHist and Plotly HOT 2
- cumulative reverse order HOT 3
- Should there be a function return sumw2? HOT 4
- Can this be Real? HOT 7
- Weird behavior HOT 1
- Naming of push/unsafe_push HOT 1
- unsafe_push when only 1 thread HOT 1
- implement Hist3D
- High precision bin edges make overfull display HOT 3
- Nonuniform weights? HOT 5
- FHist type-parameter (of eltype) is also used for the weights HOT 7
- Statbox not working on a normalized histogram
- integral should take into account binwidths HOT 4
- Normalize broken ? HOT 1
- normalize, width = true HOT 5
- Is normal that memory allocations happens when filling? HOT 16
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from fhist.jl.