Skip to content

Commit

Permalink
Merge pull request #574 from j-fu/typo_sparase
Browse files Browse the repository at this point in the history
fix typo: makeempty_SparaseMatrixCSC -> makeempty_SparseMatrixCSC
  • Loading branch information
ChrisRackauckas authored Feb 7, 2025
2 parents f322e2b + f59094d commit 227c34b
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion ext/LinearSolveSparseArraysExt.jl
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ LinearSolve.issparsematrix(A::AbstractSparseArray) = true
function LinearSolve.make_SparseMatrixCSC(A::AbstractSparseArray)
SparseMatrixCSC(size(A)..., getcolptr(A), rowvals(A), nonzeros(A))
end
function LinearSolve.makeempty_SparaseMatrixCSC(A::AbstractSparseArray)
function LinearSolve.makeempty_SparseMatrixCSC(A::AbstractSparseArray)
SparseMatrixCSC(0, 0, [1], Int[], eltype(A)[])
end

Expand Down
2 changes: 1 addition & 1 deletion src/LinearSolve.jl
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ issparsematrixcsc(A) = false
handle_sparsematrixcsc_lu(A) = lu(A)
issparsematrix(A) = false
make_SparseMatrixCSC(A) = nothing
makeempty_SparaseMatrixCSC(A) = nothing
makeempty_SparseMatrixCSC(A) = nothing

EnumX.@enumx DefaultAlgorithmChoice begin
LUFactorization
Expand Down
4 changes: 2 additions & 2 deletions src/iterative_wrappers.jl
Original file line number Diff line number Diff line change
Expand Up @@ -196,15 +196,15 @@ function init_cacheval(alg::KrylovJL, A, b, u, Pl, Pr, maxiters::Int, abstol, re
alg.KrylovAlg === Krylov.gpmr! ||
alg.KrylovAlg === Krylov.fom!)
if issparsematrixcsc(A)
KS(makeempty_SparaseMatrixCSC(A), eltype(b)[], 1)
KS(makeempty_SparseMatrixCSC(A), eltype(b)[], 1)
elseif A isa Matrix
KS(Matrix{eltype(A)}(undef, 0, 0), eltype(b)[], 1)
else
KS(A, b, 1)
end
else
if issparsematrixcsc(A)
KS(makeempty_SparaseMatrixCSC(A), eltype(b)[])
KS(makeempty_SparseMatrixCSC(A), eltype(b)[])
elseif A isa Matrix
KS(Matrix{eltype(A)}(undef, 0, 0), eltype(b)[])
else
Expand Down

0 comments on commit 227c34b

Please sign in to comment.