diff --git a/stdlib/SuiteSparse/src/spqr.jl b/stdlib/SuiteSparse/src/spqr.jl index 01fdff14038d75..f851db416a714d 100644 --- a/stdlib/SuiteSparse/src/spqr.jl +++ b/stdlib/SuiteSparse/src/spqr.jl @@ -391,7 +391,7 @@ function _ldiv_basic(F::QRSparse, B::StridedVecOrMat) X[rnk + 1:end, :] .= 0 # Solve R*X = B - LinearAlgebra.ldiv!(UpperTriangular(view(F.R, Base.OneTo(rnk), Base.OneTo(rnk))), + LinearAlgebra.ldiv!(UpperTriangular(F.R[Base.OneTo(rnk), Base.OneTo(rnk)]), view(X0, Base.OneTo(rnk), :)) # Apply right permutation and extract solution from X