Skip to content

Commit

Permalink
rewrite zeros(Bool, dims) to fill(false, dims)
Browse files Browse the repository at this point in the history
  • Loading branch information
fredrikekre committed Jan 11, 2018
1 parent e43c517 commit e07898e
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion test/sparse/sparse.jl
Original file line number Diff line number Diff line change
Expand Up @@ -544,7 +544,7 @@ end
end

@testset "issue #5985" begin
@test sprand(Bool, 4, 5, 0.0) == sparse(zeros(Bool, 4, 5))
@test sprand(Bool, 4, 5, 0.0) == sparse(fill(false, 4, 5))
@test sprand(Bool, 4, 5, 1.00) == sparse(fill(true, 4, 5))
sprb45nnzs = fill(0.0, 5)
for i=1:5
Expand Down
2 changes: 1 addition & 1 deletion test/threads.jl
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ function test_threaded_loop_and_atomic_add()
x = Atomic()
a = fill(0, 10000)
threaded_loop(a,1:10000,x)
found = zeros(Bool,10000)
found = fill(false, 10000)
was_inorder = true
for i=1:length(a)
was_inorder &= a[i]==i
Expand Down

0 comments on commit e07898e

Please sign in to comment.