Skip to content

Commit 5d50100

Browse files
committed
Remove !src in tutorials
1 parent 21856ad commit 5d50100

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

docs/src/tutorials/Getting started/sum-of-squares_matrices.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ model = SOSModel(solver)
3939
mat_cref = @constraint(model, P in PSDCone())
4040
optimize!(model)
4141
@test termination_status(model) == MOI.OPTIMAL #src
42-
termination_status(model) #!src
42+
termination_status(model)
4343

4444
# While the reformulation of sos matrix to sos polynomial is rather simple, as explained in the "Sum-of-Squares reformulation" section below, there is a technical subtelty about the Newton polytope that if not handled correctly may result in an SDP of large size with bad numerical behavior. For this reason, it is recommended to model sos *matrix* constraints as such as will be shown in this notebook and not do the formulation manually unless there is a specific reason to do so.
4545
#

docs/src/tutorials/Noncommutative and Hermitian/noncommutative_variables.jl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,14 +39,14 @@ gram_matrix(con_ref).Q
3939
# When asking for the SOS decomposition, the numerically small entries makes the solution less readable.
4040

4141
@test length(sos_decomposition(con_ref).ps) == 2 #src
42-
sos_decomposition(con_ref) #!src
42+
sos_decomposition(con_ref)
4343

4444
# They are however easily discarded by using a nonzero tolerance:
4545

4646
dec = sos_decomposition(con_ref, 1e-6) #src
4747
@test length(dec.ps) == 1 #src
4848
@test sign(first(coefficients(dec.ps[1]))) * dec.ps[1] x * y + x^2 rtol=1e-5 atol=1e-5 #src
49-
sos_decomposition(con_ref, 1e-6) #!src
49+
sos_decomposition(con_ref, 1e-6)
5050

5151
# ## Example 2.2
5252
#

docs/src/tutorials/Noncommutative and Hermitian/sums_of_hermitian_squares.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,4 +27,4 @@ optimize!(model)
2727
dec = sos_decomposition(c, 1e-6) #src
2828
@test length(dec.ps) == 1 #src
2929
@test sign(real(first(coefficients(dec.ps[1])))) * dec.ps[1] x - im * y atol=1e-6 rtol=1e-6 #src
30-
sos_decomposition(c, 1e-6) #!src
30+
sos_decomposition(c, 1e-6)

0 commit comments

Comments
 (0)