Skip to content

Commit 2804efb

Browse files
refactor: format
1 parent 0df5804 commit 2804efb

File tree

2 files changed

+13
-13
lines changed

2 files changed

+13
-13
lines changed

test/downstream/ensemble_diffeq.jl

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -2,18 +2,18 @@ using OrdinaryDiffEq, Test
22

33
A = [1 2
44
3 4]
5-
prob = ODEProblem((u, p, t) -> A*u, ones(2,2), (0.0, 1.0))
5+
prob = ODEProblem((u, p, t) -> A * u, ones(2, 2), (0.0, 1.0))
66
function prob_func(prob, i, repeat)
77
remake(prob, u0 = i * prob.u0)
88
end
99
ensemble_prob = EnsembleProblem(prob, prob_func = prob_func)
10-
sim = solve(ensemble_prob, Tsit5(), EnsembleThreads(), trajectories = 10, saveat=0.01)
10+
sim = solve(ensemble_prob, Tsit5(), EnsembleThreads(), trajectories = 10, saveat = 0.01)
1111
@test sim isa EnsembleSolution
12-
@test size(sim[1,:,:,:]) == (2,101,10)
13-
@test size(sim[:,1,:,:]) == (2,101,10)
14-
@test size(sim[:,:,1,:]) == (2,2,10)
15-
@test size(sim[:,:,:,1]) == (2,2,101)
16-
@test Array(sim)[1,:,:,:] == sim[1,:,:,:]
17-
@test Array(sim)[:,1,:,:] == sim[:,1,:,:]
18-
@test Array(sim)[:,:,1,:] == sim[:,:,1,:]
19-
@test Array(sim)[:,:,:,1] == sim[:,:,:,1]
12+
@test size(sim[1, :, :, :]) == (2, 101, 10)
13+
@test size(sim[:, 1, :, :]) == (2, 101, 10)
14+
@test size(sim[:, :, 1, :]) == (2, 2, 10)
15+
@test size(sim[:, :, :, 1]) == (2, 2, 101)
16+
@test Array(sim)[1, :, :, :] == sim[1, :, :, :]
17+
@test Array(sim)[:, 1, :, :] == sim[:, 1, :, :]
18+
@test Array(sim)[:, :, 1, :] == sim[:, :, 1, :]
19+
@test Array(sim)[:, :, :, 1] == sim[:, :, :, 1]

test/downstream/ensemble_multi_prob.jl

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,9 +17,9 @@ prob3 = ODEProblem(sys3, [3.0, 3.0], (0.0, 1.0))
1717
ensemble_prob = EnsembleProblem([prob1, prob2, prob3])
1818
sol = solve(ensemble_prob, Tsit5(), EnsembleThreads())
1919
for i in 1:3
20-
@test sol[1,:,i] == sol.u[i][x]
21-
@test sol[2,:,i] == sol.u[i][y]
20+
@test sol[1, :, i] == sol.u[i][x]
21+
@test sol[2, :, i] == sol.u[i][y]
2222
end
2323
# Ensemble is a recursive array
2424
@test only.(sol(0.0, idxs = [x])) == sol[1, 1, :]
25-
@test only.(sol(1.0, idxs = [x])) [sol[i][1, end] for i in 1:3]
25+
@test only.(sol(1.0, idxs = [x])) [sol[i][1, end] for i in 1:3]

0 commit comments

Comments
 (0)