Comments (2)
3 is too annoying to use in practice. 1 is okay, if not for the fact that plotting will need manual intervention. 2 is overall the best I think
from fhist.jl.
For future reference, all histogram filling is now done through unsafe_push!()
so overflow logic goes in a single place.
@inline function unsafe_push!(h::Hist1D{T,E}, val::Real, wgt::Real=1) where {T,E}
r = @inbounds h.hist.edges[1]
L = length(r) - 1
binidx = _edge_binindex(r, val)
if unsigned(binidx - 1) < L
@inbounds h.hist.weights[binidx] += wgt
@inbounds h.sumw2[binidx] += wgt^2
end
return nothing
end
from fhist.jl.
Related Issues (20)
- 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.