diff --git a/stdlib/SuiteSparse/src/spqr.jl b/stdlib/SuiteSparse/src/spqr.jl index 67104f4b63870..d9ca5364e906b 100644 --- a/stdlib/SuiteSparse/src/spqr.jl +++ b/stdlib/SuiteSparse/src/spqr.jl @@ -394,7 +394,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