Skip to content

Commit a6f9425

Browse files
authored
rm _replace! from discriminant analysis.jl
1 parent a2f2d56 commit a6f9425

File tree

1 file changed

+0
-18
lines changed

1 file changed

+0
-18
lines changed

src/models/discriminant_analysis.jl

Lines changed: 0 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -67,24 +67,6 @@ function MMI.fit(model::LDA, ::Int, X, y)
6767
return fitresult, cache, report
6868
end
6969

70-
71-
"""
72-
_replace!(y::AbstractVector, z::AbstractVector:, r::AbstractRange)
73-
74-
internal method essentially the same as
75-
Base.replace!(y, (z .=> r)...)
76-
but more efficient
77-
"""
78-
function _replace!(y::AbstractVector, z::AbstractVector, r::AbstractRange)
79-
length(r) == length(z) ||
80-
throw(ArgumentError("`z` and `r` has to be of the same length"))
81-
@inbounds for i in eachindex(y)
82-
for j in eachindex(z)
83-
isequal(z[j], y[i]) && (y[i] = r[j])
84-
end
85-
end
86-
end
87-
8870
function _check_lda_data(model, X, y)
8971
class_list = MMI.classes(y[1]) # Class list containing entries in pool of y.
9072
nclasses = length(class_list)

0 commit comments

Comments
 (0)