Open yurivish opened 2 years ago
In an earlier issue @jishnub noticed that certain ranges are considered nonempty despite the fact that their length is zero:
julia> r = typemin(Int):typemax(Int) -9223372036854775808:9223372036854775807 julia> length(r) 0 julia> isempty(r) false
This behavior triggers an assertion error in quantile! even though quantiles for such ranges are mathematically well-defined:
quantile!
julia> using Statistics julia> quantile!([0], r, [1]) ERROR: AssertionError: n > 0
The assertion has the comment "this case should never happen here":
https://github.com/JuliaStats/Statistics.jl/blob/0588f2cf9e43f9f72af5802feaf0af4b652c3257/src/Statistics.jl#L994
In an earlier issue @jishnub noticed that certain ranges are considered nonempty despite the fact that their length is zero:
This behavior triggers an assertion error in
quantile!
even though quantiles for such ranges are mathematically well-defined:The assertion has the comment "this case should never happen here":
https://github.com/JuliaStats/Statistics.jl/blob/0588f2cf9e43f9f72af5802feaf0af4b652c3257/src/Statistics.jl#L994