Skip to content

Commit 1de73f3

Browse files
committed
Removed redundant array from array creation
1 parent 578c2d1 commit 1de73f3

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

mllib/src/main/scala/org/apache/spark/mllib/clustering/GaussianMixtureModel.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ class GaussianMixtureModel(
6565
new MultivariateGaussian(mu(i).toBreeze.toDenseVector, sigma(i).toBreeze.toDenseMatrix)
6666
}.toArray
6767
}
68-
val weights = sc.broadcast((0 until k).map(i => weight(i)).toArray)
68+
val weights = sc.broadcast(weight)
6969
points.map{ x =>
7070
computeSoftAssignments(x.toBreeze.toDenseVector, dists.value, weights.value, k)
7171
}

0 commit comments

Comments
 (0)