We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
To reproduce:
julia> x = randn(100, 100, 100); julia> nanmedian(x, dims=(1, 2)); # Good julia> nanmedian(x, dims=(2, 3)); # Good julia> nanmedian(x, dims=(1, 2, 3)); # Good julia> nanmedian(x, dims=(1, 3)); # Bad ERROR: StackOverflowError: Stacktrace: [1] quickselect!(A::SubArray{Float64, 2, Array{Float64, 3}, Tuple{Base.Slice{Base.OneTo{Int64}}, Int64, Base.Slice{Base.OneTo{Int64}}}, false}, iₗ::Int64, iᵤ::Int64, k::Int64) @ NaNStatistics ~/.julia/packages/NaNStatistics/DurxF/src/Sorting/quicksort.jl:77 [2] quickselect!(A::SubArray{Float64, 2, Array{Float64, 3}, Tuple{Base.Slice{Base.OneTo{Int64}}, Int64, Base.Slice{Base.OneTo{Int64}}}, false}, iₗ::Int64, iᵤ::Int64, k::Int64) (repeats 20930 times) @ NaNStatistics ~/.julia/packages/NaNStatistics/DurxF/src/Sorting/quicksort.jl:117 [3] _nanmedian!(A::SubArray{Float64, 2, Array{Float64, 3}, Tuple{Base.Slice{Base.OneTo{Int64}}, Int64, Base.Slice{Base.OneTo{Int64}}}, false}, #unused#::Colon) @ NaNStatistics ~/.julia/packages/NaNStatistics/DurxF/src/Sorting/nanmedian.jl:115 [4] macro expansion @ ~/.julia/packages/NaNStatistics/DurxF/src/Sorting/nanmedian.jl:174 [inlined] [5] _nanmedian!(B::Array{Float64, 3}, A::Array{Float64, 3}, dims::Tuple{Static.StaticInt{1}, Static.StaticInt{3}}) @ NaNStatistics ~/.julia/packages/NaNStatistics/DurxF/src/Sorting/nanmedian.jl:230 [6] macro expansion @ ~/.julia/packages/NaNStatistics/DurxF/src/Sorting/nanmedian.jl:230 [inlined] [7] _nanmedian!(B::Array{Float64, 3}, A::Array{Float64, 3}, dims::Tuple{Static.StaticInt{1}, Int64}) @ NaNStatistics ~/.julia/packages/NaNStatistics/DurxF/src/Sorting/nanmedian.jl:230 [8] macro expansion @ ~/.julia/packages/NaNStatistics/DurxF/src/Sorting/nanmedian.jl:230 [inlined] [9] _nanmedian!(B::Array{Float64, 3}, A::Array{Float64, 3}, dims::Tuple{Int64, Int64}) @ NaNStatistics ~/.julia/packages/NaNStatistics/DurxF/src/Sorting/nanmedian.jl:230 [10] _nanmedian!(A::Array{Float64, 3}, dims::Tuple{Int64, Int64}) @ NaNStatistics ~/.julia/packages/NaNStatistics/DurxF/src/Sorting/nanmedian.jl:97 [11] __nanmedian! @ ~/.julia/packages/NaNStatistics/DurxF/src/Sorting/nanmedian.jl:82 [inlined] [12] __nanmedian @ ~/.julia/packages/NaNStatistics/DurxF/src/Sorting/nanmedian.jl:23 [inlined] [13] #nanmedian#32 @ ~/.julia/packages/NaNStatistics/DurxF/src/Sorting/nanmedian.jl:17 [inlined]
Julia 1.9.1 [b946abbf] NaNStatistics v0.6.31
nanmean seems fine with any dims, so I think this is unique to nanmedian (or quickselect!).
nanmean
quickselect!
The text was updated successfully, but these errors were encountered:
Sorry, something went wrong.
Add test for #43
fbb37ec
Successfully merging a pull request may close this issue.
To reproduce:
Julia 1.9.1
[b946abbf] NaNStatistics v0.6.31
nanmean
seems fine with any dims, so I think this is unique to nanmedian (orquickselect!
).The text was updated successfully, but these errors were encountered: