Skip to content

Commit 6702176

Browse files
committed
fill unstored block with zeros
1 parent 7840264 commit 6702176

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/blocksparsearrayinterface/getunstoredblock.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ function (f::GetUnstoredBlock)(
3232
return length(f.axes[d][Block(I[d])])
3333
end
3434
if I[1] == I[2]
35-
diag = similar(V, b_size[1])
35+
diag = zero!(similar(V, b_size[1]))
3636
return LinearAlgebra.Diagonal{T,V}(diag)
3737
else
3838
return zeros(T, b_size...)

0 commit comments

Comments
 (0)