Skip to content

Commit 8b65d4e

Browse files
remove line numbers by default
They didn't seem to be useful...
1 parent 0f69971 commit 8b65d4e

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

src/systems/diffeqs/abstractodesystem.jl

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -210,7 +210,7 @@ function ODEFunctionExpr{iip}(sys::AbstractODESystem, dvs = states(sys),
210210
ps = parameters(sys), u0 = nothing;
211211
version = nothing, tgrad=false,
212212
jac = false, Wfact = false,
213-
sparse = false,
213+
sparse = false,linenumbers = false,
214214
kwargs...) where {iip}
215215

216216
idx = iip ? 2 : 1
@@ -239,7 +239,7 @@ function ODEFunctionExpr{iip}(sys::AbstractODESystem, dvs = states(sys),
239239

240240
_M = (u0 === nothing || M == I) ? M : ArrayInterface.restructure(u0 .* u0',M)
241241

242-
quote
242+
ex = quote
243243
f = $f
244244
tgrad = $_tgrad
245245
jac = $_jac
@@ -255,6 +255,7 @@ function ODEFunctionExpr{iip}(sys::AbstractODESystem, dvs = states(sys),
255255
mass_matrix = M,
256256
syms = $(Symbol.(states(sys))))
257257
end
258+
!linenumbers ? striplines(ex) : ex
258259
end
259260

260261

@@ -320,7 +321,7 @@ function ODEProblemExpr{iip}(sys::AbstractODESystem,u0map,tspan,
320321
version = nothing, tgrad=false,
321322
jac = false, Wfact = false,
322323
checkbounds = false, sparse = false,
323-
linenumbers = true, parallel=SerialForm(),
324+
linenumbers = false, parallel=SerialForm(),
324325
kwargs...) where iip
325326
dvs = states(sys)
326327
ps = parameters(sys)
@@ -329,13 +330,14 @@ function ODEProblemExpr{iip}(sys::AbstractODESystem,u0map,tspan,
329330
f = ODEFunctionExpr{iip}(sys,dvs,ps,u0;tgrad=tgrad,jac=jac,Wfact=Wfact,checkbounds=checkbounds,
330331
linenumbers=linenumbers,parallel=parallel,
331332
sparse=sparse)
332-
quote
333+
ex = quote
333334
f = $f
334335
u0 = $u0
335336
tspan = $tspan
336337
p = $p
337338
ODEProblem{iip}(f,u0,tspan,p;$(kwargs...))
338339
end
340+
!linenumbers ? striplines(ex) : ex
339341
end
340342

341343
function ODEProblemExpr(sys::AbstractODESystem, args...; kwargs...)

0 commit comments

Comments
 (0)