Skip to content

Commit df8f0f8

Browse files
authored
fix value-preserving zerocorr! (#275)
1 parent d02b313 commit df8f0f8

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/remat.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -554,8 +554,8 @@ vsize(A::ReMat{T,S}) where {T,S} = S
554554

555555
function zerocorr!(A::ReMat{T}) where {T}
556556
λ = A.λ
557-
A.inds = intersect(A.inds, diagind(λ))
558557
# zero out all entries not on the diagonal
559558
λ[setdiff(A.inds, diagind(λ))] .= 0
559+
A.inds = intersect(A.inds, diagind(λ))
560560
A
561561
end

0 commit comments

Comments
 (0)