Skip to content

Commit 8a0415b

Browse files
refactor: format
1 parent 49e37a2 commit 8a0415b

File tree

2 files changed

+7
-8
lines changed

2 files changed

+7
-8
lines changed

ext/MTKChainRulesCoreExt.jl

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,8 @@ import ChainRulesCore: NoTangent
66

77
function ChainRulesCore.rrule(::Type{MTK.MTKParameters}, tunables, args...)
88
function mtp_pullback(dt)
9-
(NoTangent(), dt.tunable[1:length(tunables)], ntuple(_ -> NoTangent(), length(args))...)
9+
(NoTangent(), dt.tunable[1:length(tunables)],
10+
ntuple(_ -> NoTangent(), length(args))...)
1011
end
1112
MTK.MTKParameters(tunables, args...), mtp_pullback
1213
end

test/extensions/ad.jl

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -8,15 +8,13 @@ using SciMLSensitivity
88

99
@variables x(t)[1:3] y(t)
1010
@parameters p[1:3, 1:3] q
11-
eqs = [
12-
D(x) ~ p * x
13-
D(y) ~ sum(p) + q * y
14-
]
11+
eqs = [D(x) ~ p * x
12+
D(y) ~ sum(p) + q * y]
1513
u0 = [x => zeros(3),
16-
y => 1.]
14+
y => 1.0]
1715
ps = [p => zeros(3, 3),
18-
q => 1.]
19-
tspan = (0., 10.)
16+
q => 1.0]
17+
tspan = (0.0, 10.0)
2018
@mtkbuild sys = ODESystem(eqs, t)
2119
prob = ODEProblem(sys, u0, tspan, ps)
2220
sol = solve(prob, Tsit5())

0 commit comments

Comments
 (0)