Skip to content

Commit 925acef

Browse files
authored
Return view in _diag for Bidiagonal (#1258)
Since the idea of the function is to avoid allocations, we should be returning a view here.
1 parent b1bcca1 commit 925acef

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/bidiag.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -583,7 +583,7 @@ function _diag(A::Bidiagonal, k)
583583
elseif k == _offdiagind(A.uplo)
584584
return A.ev
585585
else
586-
return diag(A, k)
586+
return diagview(A, k)
587587
end
588588
end
589589

0 commit comments

Comments
 (0)