Skip to content

Commit acbc6d8

Browse files
Merge pull request #102 from Wimmerer/nonsquare_sizes
Nonsquare matrix fix
2 parents 3ba3bc3 + e4d13ce commit acbc6d8

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

src/common.jl

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,12 @@ function SciMLBase.init(prob::LinearProblem, alg::Union{SciMLLinearSolveAlgorith
8787
)
8888
@unpack A, b, u0, p = prob
8989

90-
u0 = (u0 !== nothing) ? u0 : zero(b)
90+
u0 = if u0 !== nothing
91+
u0
92+
else
93+
u0 = similar(b, size(A, 2))
94+
fill!(u0,false)
95+
end
9196

9297
cacheval = init_cacheval(alg, A, b, u0, Pl, Pr, maxiters, abstol, reltol, verbose)
9398
isfresh = true

0 commit comments

Comments
 (0)