Skip to content

Commit

Permalink
talk
Browse files Browse the repository at this point in the history
  • Loading branch information
tschm committed Oct 20, 2023
1 parent d9b092c commit cbc498e
Show file tree
Hide file tree
Showing 3 changed files with 29 additions and 3 deletions.
10 changes: 10 additions & 0 deletions experiments/talk/minVariance1.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
from time import sleep
import timeit
def f():
sleep(1)


if __name__ == '__main__':
execution_time = timeit.timeit(f, number=5)
print(f"{execution_time:.6f} seconds")

15 changes: 15 additions & 0 deletions experiments/talk/minVariance2.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
import numpy as np
import cvxpy as cp

if __name__ == '__main__':
n = 200
C = np.random.rand(n,n)
A = C @ C.T

#print(A)
result = np.linalg.eigh(A)
assert np.all(result.eigenvalues > 0)

L = np.linalg.cholesky(A)

x = cp.Variable(n)
7 changes: 4 additions & 3 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,10 @@ cvxpy = "*"
fire = "*"

[tool.poetry.group.test.dependencies]
pytest = "7.4.2"
pytest-cov = "4.1.0"
pytest = "*"
pytest-cov = "*"
mock = "*"
pre-commit = "*"

[tool.poetry.group.dev.dependencies]
pandas = "*"
Expand All @@ -29,7 +30,7 @@ cvxsimulator = ">=0.7.3"
cvxbson= "*"

[build-system]
requires = ["poetry>=1.6.0"]
requires = ["poetry>=1.3.0"]
build-backend = "poetry.core.masonry.api"

# Relevant documentation:
Expand Down

0 comments on commit cbc498e

Please sign in to comment.