Skip to content

Commit 2535183

Browse files
committed
make verbose = Bool also valid for backwards compat
1 parent fe278d9 commit 2535183

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

src/common.jl

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -204,6 +204,18 @@ function __init(prob::LinearProblem, alg::SciMLLinearSolveAlgorithm,
204204
deepcopy(A)
205205
end
206206

207+
if verbose isa Bool
208+
#@warn "Using `true` or `false` for `verbose` is being deprecated. Please use a `LinearVerbosity` type to specify verbosity settings.
209+
# For details see the verbosity section of the common solver options documentation page."
210+
if verbose
211+
verbose = LinearVerbosity()
212+
else
213+
verbose = LinearVerbosity(Verbosity.None())
214+
end
215+
elseif verbose isa Verbosity.Type
216+
verbose = LinearVerbosity(verbose)
217+
end
218+
207219
b = if issparsematrix(b) && !(A isa Diagonal)
208220
Array(b) # the solution to a linear solve will always be dense!
209221
elseif alias_b || b isa SVector

0 commit comments

Comments
 (0)