Skip to content

Commit 4b9e885

Browse files
committed
fix diag(nothing) in mve
1 parent 6aa8241 commit 4b9e885

1 file changed

Lines changed: 5 additions & 0 deletions

File tree

src/mve.jl

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -100,6 +100,11 @@ function robcov(data::Matrix; alpha=0.01, estimator=:mve)
100100
covmatrix=covmatrix,
101101
),
102102
)
103+
104+
if isnothing(md2)
105+
throw(ErrorException("Error in Mahalanobis distance calculation."))
106+
end
107+
103108
outlierset = filter(x -> md2[x] > chisqcrit, 1:n)
104109
result = Dict{String,Any}()
105110
result["goal"] = mingoal

0 commit comments

Comments
 (0)