Skip to content

Commit 14b5a05

Browse files
author
andre_ramos
committed
fix blue format
1 parent 6058199 commit 14b5a05

File tree

2 files changed

+10
-8
lines changed

2 files changed

+10
-8
lines changed

src/models/structural_model.jl

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1500,7 +1500,6 @@ function simulate_states(
15001500
if model.cycle_period != 0
15011501
cycles_t = zeros(AbstractFloat, length(model.cycle_period))
15021502
for i in eachindex(model.cycle_period)
1503-
15041503
λ = 2 * pi * (1:(T + steps_ahead)) / model.cycle_period[i]
15051504

15061505
if model.stochastic_cycle
@@ -1521,11 +1520,10 @@ function simulate_states(
15211520
j in eachindex(stochastic_cycles_cos_set[i][1:(t - T)])
15221521
)
15231522
else
1524-
cycle_t =
1525-
dot(
1526-
model.output.components["c1_$(model.cycle_period[i])"]["Coefs"],
1527-
[cos(λ[t]), sin(λ[t])],
1528-
)
1523+
cycle_t = dot(
1524+
model.output.components["c1_$(model.cycle_period[i])"]["Coefs"],
1525+
[cos(λ[t]), sin(λ[t])],
1526+
)
15291527
end
15301528
cycles_t[i] = cycle_t
15311529
end

test/models/structural_model.jl

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -811,12 +811,16 @@ end
811811
),
812812
) == 10
813813

814-
model7 = StateSpaceLearning.StructuralModel(y3; seasonal="none", cycle="deterministic", cycle_period=[12, 6, 4, 3, 12/5, 2])
814+
model7 = StateSpaceLearning.StructuralModel(
815+
y3; seasonal="none", cycle="deterministic", cycle_period=[12, 6, 4, 3, 12 / 5, 2]
816+
)
815817
StateSpaceLearning.fit!(model7)
816818
forecast7 = trunc.(StateSpaceLearning.forecast(model7, 18); digits=3)
817819
@test length(forecast7) == 18
818820

819-
model8 = StateSpaceLearning.StructuralModel(y3; seasonal="none", cycle="stochastic", cycle_period=[12, 6, 4, 3, 12/5, 2])
821+
model8 = StateSpaceLearning.StructuralModel(
822+
y3; seasonal="none", cycle="stochastic", cycle_period=[12, 6, 4, 3, 12 / 5, 2]
823+
)
820824
StateSpaceLearning.fit!(model8)
821825
forecast8 = trunc.(StateSpaceLearning.forecast(model8, 18); digits=3)
822826
@test length(forecast8) == 18

0 commit comments

Comments
 (0)