diff --git a/src/recipes.jl b/src/recipes.jl index 61d3de87..876b3897 100644 --- a/src/recipes.jl +++ b/src/recipes.jl @@ -501,7 +501,7 @@ wand_edges(x...) = (warn("Load the StatPlots package in order to use :wand bins. function _auto_binning_nbins{N}(vs::NTuple{N,AbstractVector}, dim::Integer; mode::Symbol = :auto) _cl(x) = ceil(Int, NaNMath.max(x, one(x))) - _iqr(v) = quantile(v, 0.75) - quantile(v, 0.25) + _iqr(v) = (q = quantile(v, 0.75) - quantile(v, 0.25); q > 0 ? q : oftype(q, 1)) _span(v) = ignorenan_maximum(v) - ignorenan_minimum(v) n_samples = length(linearindices(first(vs))) diff --git a/test/runtests.jl b/test/runtests.jl index da7fcb05..3f471735 100644 --- a/test/runtests.jl +++ b/test/runtests.jl @@ -129,6 +129,9 @@ end @test Plots.ignorenan_extrema(axis) == (0.5, 7.5) end +@testset "NoFail" begin + histogram([1, 0, 0, 0, 0, 0]) +end # tests for preprocessing recipes