Skip to content

Commit

Permalink
Remove braces from string interpolation when not required.
Browse files Browse the repository at this point in the history
  • Loading branch information
Juliet Hougland committed Apr 15, 2015
1 parent 1221f94 commit ab321bb
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -215,8 +215,8 @@ object Vectors {
require(prev < i, s"Found duplicate indices: $i.")
prev = i
}
require(prev < size, s"You may not write an element to index ${prev} because the declared " +
s"size of your vector is ${size}")
require(prev < size, s"You may not write an element to index $prev because the declared " +
s"size of your vector is $size")

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

0 comments on commit ab321bb

Please sign in to comment.