chiark
/
gitweb
/
~ianmdlvl
/
nlopt.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(from parent 1:
c43afa0
)
Update the Python example for py3k compatibility
author
Julien Schueller
<schueller@phimeca.com>
Sun, 27 Aug 2017 11:34:49 +0000
(13:34 +0200)
committer
Julien Schueller
<schueller@phimeca.com>
Sun, 27 Aug 2017 11:34:49 +0000
(13:34 +0200)
doc/docs/NLopt_Tutorial.md
patch
|
blob
|
history
diff --git
a/doc/docs/NLopt_Tutorial.md
b/doc/docs/NLopt_Tutorial.md
index 9d07827cd5a6355149f7af9aed11c5bb4905ed94..faf9d1bb933624f94630f9830ba6cdd3d0453431 100644
(file)
--- a/
doc/docs/NLopt_Tutorial.md
+++ b/
doc/docs/NLopt_Tutorial.md
@@
-447,9
+447,9
@@
opt.add_inequality_constraint(lambda x,grad: myconstraint(x,grad,-1,1), 1e-8)
opt.set_xtol_rel(1e-4)
x = opt.optimize([1.234, 5.678])
minf = opt.last_optimum_value()
-print
"optimum at ", x[0],x[1]
-print
"minimum value = ", minf
-print
"result code = ", opt.last_optimize_result(
)
+print
("optimum at ", x[0], x[1])
+print
("minimum value = ", minf)
+print
("result code = ", opt.last_optimize_result()
)
```