Skip to content
New issue

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

empty nanmedian segfaults on Vector{Float64} #30

Closed
adienes opened this issue Jan 23, 2023 · 4 comments · Fixed by #31
Closed

empty nanmedian segfaults on Vector{Float64} #30

adienes opened this issue Jan 23, 2023 · 4 comments · Fixed by #31

Comments

@adienes
Copy link

adienes commented Jan 23, 2023

julia> using NaNStatistics

julia> nanmedian([])
┌ Warning: #= /Users/andy/.julia/packages/NaNStatistics/TKMwf/src/Sorting/quicksort.jl:5 =#:
│ `LoopVectorization.check_args` on your inputs failed; running fallback `@inbounds @fastmath` loop instead.
│ Use `warn_check_args=false`, e.g. `@turbo warn_check_args=false ...`, to disable this warning.
└ @ NaNStatistics ~/.julia/packages/LoopVectorization/JLuqo/src/condense_loopset.jl:1148
ERROR: MethodError: no method matching float(::Type{Any})

julia> nanmedian(Int[])
NaN

julia> nanmedian(Float64[])

[80496] signal (11.2): Segmentation fault: 11
@adienes
Copy link
Author

adienes commented Jan 23, 2023

julia-1.9.0-beta3+0.aarch64.apple.darwin14

@brenhinkeller
Copy link
Owner

Thanks for the report! Should be able to put in a fix for this pretty quicly

@adienes
Copy link
Author

adienes commented Jan 23, 2023

awesome, thanks!

@brenhinkeller
Copy link
Owner

JuliaRegistries/General#76218 should have the fix, once that gets merged

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants