From 40fe4a0d90ea57086d51d16a1596a43c826da991 Mon Sep 17 00:00:00 2001
From: Morten Hjorth-Jensen
Date: Thu, 17 Nov 2022 11:35:59 +0100
Subject: [PATCH] problems with quotations in python code
---
doc/pub/week46/html/._week46-bs029.html | 12 +-
doc/pub/week46/html/week46-reveal.html | 14 +-
doc/pub/week46/html/week46-solarized.html | 14 +-
doc/pub/week46/html/week46.html | 14 +-
doc/pub/week46/ipynb/ipynb-week46-src.tar.gz | Bin 192 -> 192 bytes
doc/pub/week46/ipynb/week46.ipynb | 360 +++++++++----------
doc/src/week46/week46.do.txt | 13 +-
7 files changed, 209 insertions(+), 218 deletions(-)
diff --git a/doc/pub/week46/html/._week46-bs029.html b/doc/pub/week46/html/._week46-bs029.html
index 0e5dff381..76e5ee1d1 100644
--- a/doc/pub/week46/html/._week46-bs029.html
+++ b/doc/pub/week46/html/._week46-bs029.html
@@ -235,15 +235,15 @@ The following code solves the equations for us
import numpy
from cvxopt import matrix
from cvxopt import solvers
-P = matrix(numpy.diag([1,0]), tc=’d’)
-q = matrix(numpy.array([3,4]), tc=’d’)
-G = matrix(numpy.array([[-1,0],[0,-1],[-1,-3],[2,5],[3,4]]), tc=’d’)
-h = matrix(numpy.array([0,0,-15,100,80]), tc=’d’)
+P = matrix(numpy.diag([1,0]), tc='d')
+q = matrix(numpy.array([3,4]), tc='d')
+G = matrix(numpy.array([[-1,0],[0,-1],[-1,-3],[2,5],[3,4]]), tc='d')
+h = matrix(numpy.array([0,0,-15,100,80]), tc='d')
# Construct the QP, invoke solver
sol = solvers.qp(P,q,G,h)
# Extract optimal value and solution
-sol[’x’]
-sol[’primal objective’]
+sol['x']
+sol['primal objective']
diff --git a/doc/pub/week46/html/week46-reveal.html b/doc/pub/week46/html/week46-reveal.html
index 5a4ad358e..35f145a29 100644
--- a/doc/pub/week46/html/week46-reveal.html
+++ b/doc/pub/week46/html/week46-reveal.html
@@ -1584,15 +1584,15 @@ The following code solves the equations for us
import numpy
from cvxopt import matrix
from cvxopt import solvers
-P = matrix(numpy.diag([1,0]), tc=’d’)
-q = matrix(numpy.array([3,4]), tc=’d’)
-G = matrix(numpy.array([[-1,0],[0,-1],[-1,-3],[2,5],[3,4]]), tc=’d’)
-h = matrix(numpy.array([0,0,-15,100,80]), tc=’d’)
+P = matrix(numpy.diag([1,0]), tc='d')
+q = matrix(numpy.array([3,4]), tc='d')
+G = matrix(numpy.array([[-1,0],[0,-1],[-1,-3],[2,5],[3,4]]), tc='d')
+h = matrix(numpy.array([0,0,-15,100,80]), tc='d')
# Construct the QP, invoke solver
sol = solvers.qp(P,q,G,h)
# Extract optimal value and solution
-sol[’x’]
-sol[’primal objective’]
+sol['x']
+sol['primal objective']
@@ -1628,8 +1628,6 @@ $$
\( \boldsymbol{y}=[y_1,y_2,\dots,y_n] \).
With the slack constants this leads to the additional constraint \( 0\leq \lambda_i \leq C \).
-
-code will be added
diff --git a/doc/pub/week46/html/week46-solarized.html b/doc/pub/week46/html/week46-solarized.html
index af76d1937..6eb3dc309 100644
--- a/doc/pub/week46/html/week46-solarized.html
+++ b/doc/pub/week46/html/week46-solarized.html
@@ -1399,15 +1399,15 @@ The following code solves the equations for us
import numpy
from cvxopt import matrix
from cvxopt import solvers
-P = matrix(numpy.diag([1,0]), tc=’d’)
-q = matrix(numpy.array([3,4]), tc=’d’)
-G = matrix(numpy.array([[-1,0],[0,-1],[-1,-3],[2,5],[3,4]]), tc=’d’)
-h = matrix(numpy.array([0,0,-15,100,80]), tc=’d’)
+P = matrix(numpy.diag([1,0]), tc='d')
+q = matrix(numpy.array([3,4]), tc='d')
+G = matrix(numpy.array([[-1,0],[0,-1],[-1,-3],[2,5],[3,4]]), tc='d')
+h = matrix(numpy.array([0,0,-15,100,80]), tc='d')
# Construct the QP, invoke solver
sol = solvers.qp(P,q,G,h)
# Extract optimal value and solution
-sol[’x’]
-sol[’primal objective’]
+sol['x']
+sol['primal objective']
@@ -1442,8 +1442,6 @@ $$
With the slack constants this leads to the additional constraint \( 0\leq \lambda_i \leq C \).
-code will be added
-
© 1999-2022, Morten Hjorth-Jensen. Released under CC Attribution-NonCommercial 4.0 license
diff --git a/doc/pub/week46/html/week46.html b/doc/pub/week46/html/week46.html
index 1bde18e5d..6642e43c7 100644
--- a/doc/pub/week46/html/week46.html
+++ b/doc/pub/week46/html/week46.html
@@ -1476,15 +1476,15 @@ The following code solves the equations for us
import numpy
from cvxopt import matrix
from cvxopt import solvers
-P = matrix(numpy.diag([1,0]), tc=’d’)
-q = matrix(numpy.array([3,4]), tc=’d’)
-G = matrix(numpy.array([[-1,0],[0,-1],[-1,-3],[2,5],[3,4]]), tc=’d’)
-h = matrix(numpy.array([0,0,-15,100,80]), tc=’d’)
+P = matrix(numpy.diag([1,0]), tc='d')
+q = matrix(numpy.array([3,4]), tc='d')
+G = matrix(numpy.array([[-1,0],[0,-1],[-1,-3],[2,5],[3,4]]), tc='d')
+h = matrix(numpy.array([0,0,-15,100,80]), tc='d')
# Construct the QP, invoke solver
sol = solvers.qp(P,q,G,h)
# Extract optimal value and solution
-sol[’x’]
-sol[’primal objective’]
+sol['x']
+sol['primal objective']
@@ -1519,8 +1519,6 @@ $$
With the slack constants this leads to the additional constraint \( 0\leq \lambda_i \leq C \).
-code will be added
-
© 1999-2022, Morten Hjorth-Jensen. Released under CC Attribution-NonCommercial 4.0 license
diff --git a/doc/pub/week46/ipynb/ipynb-week46-src.tar.gz b/doc/pub/week46/ipynb/ipynb-week46-src.tar.gz
index 71b644ccaaac060fd86ec1bcb02cb9ab7faa8180..846111d950fb3972f89438ccaf9fd63601dfe72e 100644
GIT binary patch
delta 136
zcmV;30C)eu0l)zsABzY8dJcAD00ZsM%?iRW3LTL