42 lines
2.2 KiB
Plaintext
42 lines
2.2 KiB
Plaintext
Traceback (most recent call last):
|
||
File "/Users/mhjensen/miniforge3/envs/myenv/lib/python3.9/site-packages/jupyter_cache/executors/utils.py", line 51, in single_nb_execution
|
||
executenb(
|
||
File "/Users/mhjensen/miniforge3/envs/myenv/lib/python3.9/site-packages/nbclient/client.py", line 1204, in execute
|
||
return NotebookClient(nb=nb, resources=resources, km=km, **kwargs).execute()
|
||
File "/Users/mhjensen/miniforge3/envs/myenv/lib/python3.9/site-packages/nbclient/util.py", line 84, in wrapped
|
||
return just_run(coro(*args, **kwargs))
|
||
File "/Users/mhjensen/miniforge3/envs/myenv/lib/python3.9/site-packages/nbclient/util.py", line 62, in just_run
|
||
return loop.run_until_complete(coro)
|
||
File "/Users/mhjensen/miniforge3/envs/myenv/lib/python3.9/asyncio/base_events.py", line 642, in run_until_complete
|
||
return future.result()
|
||
File "/Users/mhjensen/miniforge3/envs/myenv/lib/python3.9/site-packages/nbclient/client.py", line 663, in async_execute
|
||
await self.async_execute_cell(
|
||
File "/Users/mhjensen/miniforge3/envs/myenv/lib/python3.9/site-packages/nbclient/client.py", line 965, in async_execute_cell
|
||
await self._check_raise_for_error(cell, cell_index, exec_reply)
|
||
File "/Users/mhjensen/miniforge3/envs/myenv/lib/python3.9/site-packages/nbclient/client.py", line 862, in _check_raise_for_error
|
||
raise CellExecutionError.from_cell_and_msg(cell, exec_reply_content)
|
||
nbclient.exceptions.CellExecutionError: An error occurred while executing the following cell:
|
||
------------------
|
||
# Import the necessary packages
|
||
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’)
|
||
# Construct the QP, invoke solver
|
||
sol = solvers.qp(P,q,G,h)
|
||
# Extract optimal value and solution
|
||
sol[’x’]
|
||
sol[’primal objective’]
|
||
------------------
|
||
|
||
[0;36m Input [0;32mIn [5][0;36m[0m
|
||
[0;31m P = matrix(numpy.diag([1,0]), tc=’d’)[0m
|
||
[0m ^[0m
|
||
[0;31mSyntaxError[0m[0;31m:[0m invalid character '’' (U+2019)
|
||
|
||
SyntaxError: invalid character '’' (U+2019) (3974140161.py, line 5)
|
||
|