Open
Description
When normalizing a Histogram
, the normalize
function produces floating point values for the weights. The in-place version (i.e. normalize!
) can only be called for Histogram
s that have floating point weights. When calling normalize!
on a Histogram
with non-floating point weights the resulting "no method matching..." MethodError
is technically correct, but it would be more helpful to display a more informative message. This could be done my defining:
function normalize!(h::Histogram{T,N}, aux_weights::Array{T,N}...; mode::Symbol=:pdf) where {T,N}
error("Cannot normalize a Histogram with $T weights in-place")
end
Metadata
Metadata
Assignees
Labels
No labels