Skip to content

Commit ab321bb

Browse files
author
Juliet Hougland
committed
Remove braces from string interpolation when not required.
1 parent 1221f94 commit ab321bb

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

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

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -215,8 +215,8 @@ object Vectors {
215215
require(prev < i, s"Found duplicate indices: $i.")
216216
prev = i
217217
}
218-
require(prev < size, s"You may not write an element to index ${prev} because the declared " +
219-
s"size of your vector is ${size}")
218+
require(prev < size, s"You may not write an element to index $prev because the declared " +
219+
s"size of your vector is $size")
220220

221221
new SparseVector(size, indices.toArray, values.toArray)
222222
}
@@ -292,7 +292,7 @@ object Vectors {
292292
*/
293293
def norm(vector: Vector, p: Double): Double = {
294294
require(p >= 1.0, "To compute the p-norm of the vector, we require that you specify a p>=1. " +
295-
s"You specified p=${p}.")
295+
s"You specified p=$p.")
296296
val values = vector match {
297297
case DenseVector(vs) => vs
298298
case SparseVector(n, ids, vs) => vs

0 commit comments

Comments
 (0)