Skip to content

Commit 45adbd0

Browse files
committed
Remove fallback
1 parent 988e3f7 commit 45adbd0

File tree

1 file changed

+1
-16
lines changed

1 file changed

+1
-16
lines changed

src/LinearSolve.jl

Lines changed: 1 addition & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -153,24 +153,9 @@ end
153153
needs_square_A(alg)
154154
155155
Returns `true` if the algorithm requires a square matrix.
156-
157-
Note that this checks if the implementation of the algorithm needs a square matrix by
158-
trying to solve an underdetermined system. It is recommended to add a dispatch to this
159-
function for custom algorithms!
160156
"""
161157
needs_square_A(::Nothing) = false # Linear Solve automatically will use a correct alg!
162-
function needs_square_A(alg::SciMLLinearSolveAlgorithm)
163-
try
164-
A = [1.0 2.0;
165-
3.0 4.0;
166-
5.0 6.0]
167-
b = ones(Float64, 3)
168-
solve(LinearProblem(A, b), alg)
169-
return false
170-
catch err
171-
return true
172-
end
173-
end
158+
needs_square_A(alg::SciMLLinearSolveAlgorithm) = true
174159
for alg in (:QRFactorization, :FastQRFactorization, :NormalCholeskyFactorization,
175160
:NormalBunchKaufmanFactorization)
176161
@eval needs_square_A(::$(alg)) = false

0 commit comments

Comments
 (0)