Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add keepzeros option in sparse #12608

Closed
wants to merge 4 commits into from
Closed
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
update test
matthieugomez authored and matthieugomez committed Aug 13, 2015
commit b373bb3f6de60fecebf50ccfa9f028eefe2b4c64
3 changes: 2 additions & 1 deletion test/sparsedir/sparse.jl
Original file line number Diff line number Diff line change
@@ -4,7 +4,8 @@
@test isequal(full(sparse(complex(ones(5,5),ones(5,5)))), complex(ones(5,5),ones(5,5)))

# test zeros can be kept
@test nonzeros(sparse([1, 2], [1, 2], [0, 1])) == [0, 1]
@test nonzeros(sparse([1, 2], [1, 2], [0, 1])) == [1]
@test nonzeros(sparse([1, 2], [1, 2], [0, 1]), keepzeros = true) == [0, 1]

# check matrix operations
se33 = speye(3)