Skip to content

Commit

Permalink
Take care of special case.
Browse files Browse the repository at this point in the history
  • Loading branch information
viirya committed Jan 3, 2015
1 parent b789f42 commit 39a3ca6
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -182,11 +182,11 @@ class VectorsSuite extends FunSuite {
val length = random.nextInt(m) + 1

val indices1 = random.shuffle(0 to m - 1).toArray.slice(0, length).sorted
val values1 = indices1.map(i => random.nextInt(m) * random.nextDouble())
val values1 = indices1.map(i => random.nextInt(m + 1) * random.nextDouble())
val sparseVector1 = Vectors.sparse(m, indices1, values1)

val indices2 = random.shuffle(0 to m - 1).toArray.slice(0, length).sorted
val values2 = indices2.map(i => random.nextInt(m) * random.nextDouble())
val values2 = indices2.map(i => random.nextInt(m + 1) * random.nextDouble())
val sparseVector2 = Vectors.sparse(m, indices2, values2)

val denseVector1 = Vectors.dense(sparseVector1.toArray)
Expand Down

0 comments on commit 39a3ca6

Please sign in to comment.