You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The var function operates pointwise on array arguments ( JuliaLang/julia#23897. It doesn't seem to be documented). But it fails for empty vector of arrays:
julia> using Statistics, StaticArrays
julia> var(SVector{2}.(1:5,2:6))
2-element SArray{Tuple{2},Float64,1,2} with indices SOneTo(2):
2.5
2.5
julia> var(SVector{2,Float64}[])
ERROR: MethodError: no method matching abs2(::SArray{Tuple{2},Float64,1,2})
[...]
This should return SVector(NaN,NaN), since var(Float64[]) === NaN.
The text was updated successfully, but these errors were encountered:
The
var
function operates pointwise on array arguments ( JuliaLang/julia#23897. It doesn't seem to be documented). But it fails for empty vector of arrays:This should return
SVector(NaN,NaN)
, sincevar(Float64[]) === NaN
.The text was updated successfully, but these errors were encountered: