add faster method for 1-d histogram

This commit is contained in:
Michael Krabbe Borregaard 2019-01-13 14:17:54 +01:00
parent d29a44efa7
commit 979f9495f1

View File

@ -635,6 +635,7 @@ _hist_edges(vs::NTuple{N,AbstractVector}, binning::Union{Integer, Symbol, Abstra
_hist_norm_mode(mode::Symbol) = mode
_hist_norm_mode(mode::Bool) = mode ? :pdf : :none
_filternans(vs::NTuple{1,AbstractVector}) = filter!.(!isnan, vs)
function _filternans(vs::NTuple{N,AbstractVector}) where N
_invertedindex(v, not) = [j for (i,j) in enumerate(v) if !(i not)]
nots = union(Set.(findall.(isnan, vs))...)