Skip to content

Commit 14b871a

Browse files
committed
debug: Julia 1.10 now works
1 parent 996436c commit 14b871a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/controller/construct.jl

+1-1
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ struct ControllerWeights{
6464
if !isinf_C
6565
# ΔŨ = [ΔU; ϵ] (ϵ is the slack variable)
6666
Ñ_Hc = [N_Hc zeros(NT, nΔU, 1); zeros(NT, 1, nΔU) C]
67-
Ñ_Hc = NW(Ñ_Hc) # preserve special type e.g. Diagonal
67+
isdiag(N_Hc) && (Ñ_Hc = Diagonal(Ñ_Hc)) # NW(Ñ_Hc) does not work on Julia 1.10
6868
else
6969
# ΔŨ = ΔU (only hard constraints)
7070
Ñ_Hc = N_Hc

0 commit comments

Comments
 (0)