Skip to content

Commit

Permalink
Fix copy_triangle for Julia 1.11
Browse files Browse the repository at this point in the history
  • Loading branch information
amontoison committed May 22, 2024
1 parent 5605b36 commit 7214572
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion src/block_krylov_utils.jl
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,13 @@ function copy_triangle(Q::AbstractMatrix{FC}, R::AbstractMatrix{FC}, k::Int) whe
end
end
else
copytrito!(R, Q, 'U')
mR, nR = size(R)
mQ, nQ = size(Q)
if (mR == mQ) && (nR == nQ)
copytrito!(R, Q, 'U')
else
copytrito!(R, view(Q, 1:k, 1:k), 'U')
end
end
return R
end
Expand Down

0 comments on commit 7214572

Please sign in to comment.