Skip to content
Snippets Groups Projects
Commit 0c498717 authored by lewuathe's avatar lewuathe Committed by Xiangrui Meng
Browse files

[SPARK-10715] [ML] Duplicate initialization flag in WeightedLeastSquare

There are duplicate set of initialization flag in `WeightedLeastSquares#add`.
`initialized` is already set in `init(Int)`.

Author: lewuathe <lewuathe@me.com>

Closes #8837 from Lewuathe/duplicate-initialization-flag.
parent 1aa9e502
No related branches found
No related tags found
No related merge requests found
......@@ -193,7 +193,6 @@ private[ml] object WeightedLeastSquares {
val ak = a.size
if (!initialized) {
init(ak)
initialized = true
}
assert(ak == k, s"Dimension mismatch. Expect vectors of size $k but got $ak.")
count += 1L
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment