Skip to content

Commit aa330e3

Browse files
committed
Fixing some last if else spacing issues
1 parent ac53c55 commit aa330e3

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

mllib/src/main/scala/org/apache/spark/mllib/linalg/Vectors.scala

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -736,9 +736,9 @@ class SparseVector(
736736
}
737737

738738
// look for inactive values in case all active node values are negative
739-
if (size != values.size && maxValue <= 0){
739+
if (size != values.size && maxValue <= 0) {
740740
val firstInactiveIdx = calcFirstInactiveIdx(0)
741-
if (!(maxValue == 0 && firstInactiveIdx >= maxIdx)){
741+
if (!(maxValue == 0 && firstInactiveIdx >= maxIdx)) {
742742
maxIdx = firstInactiveIdx
743743
}
744744
maxValue = 0

mllib/src/test/scala/org/apache/spark/mllib/linalg/VectorsSuite.scala

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ class VectorsSuite extends FunSuite {
6363
assert(vec.toArray.eq(arr))
6464
}
6565

66-
test("dense argmax"){
66+
test("dense argmax") {
6767
val vec = Vectors.dense(Array.empty[Double]).asInstanceOf[DenseVector]
6868
assert(vec.argmax === -1)
6969

@@ -81,7 +81,7 @@ class VectorsSuite extends FunSuite {
8181
assert(vec.toArray === arr)
8282
}
8383

84-
test("sparse argmax"){
84+
test("sparse argmax") {
8585
val vec = Vectors.sparse(0,Array.empty[Int],Array.empty[Double]).asInstanceOf[SparseVector]
8686
val noMax = vec.argmax
8787
assert(noMax === -1)

0 commit comments

Comments
 (0)