Skip to content

Commit

Permalink
filter zeros in sparse
Browse files Browse the repository at this point in the history
  • Loading branch information
rezazadeh committed Mar 20, 2014
1 parent 6115610 commit 0dc7980
Showing 1 changed file with 1 addition and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@ object LAUtils {
val n = a.n
val data = a.rows.flatMap{
mrow => Array.tabulate(n)(j => MatrixEntry(mrow.i, j, mrow.data(j)))
.filter(x => x.mval != 0)
}
SparseMatrix(data, m, n)
}
Expand Down

0 comments on commit 0dc7980

Please sign in to comment.