Skip to content

Commit cb26214

Browse files
committed
removed so files
1 parent c61ea90 commit cb26214

File tree

4 files changed

+11
-5
lines changed

4 files changed

+11
-5
lines changed

.gitignore

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,8 @@
1212
__pycache__/
1313
*.py[cod]
1414

15-
# # C extensions
16-
# *.so
15+
# C extensions
16+
*.so
1717

1818
# Distribution / packaging
1919
bin/

notebooks/c-code.ipynb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
},
1919
{
2020
"cell_type": "code",
21-
"execution_count": 13,
21+
"execution_count": 3,
2222
"id": "13428385",
2323
"metadata": {},
2424
"outputs": [
@@ -27,7 +27,7 @@
2727
"output_type": "stream",
2828
"text": [
2929
"Half-life of theta in days = 87.3365447505531\n",
30-
"2.7094292640686035\n"
30+
"3.0940842628479004\n"
3131
]
3232
}
3333
],

src/risktools/_sims.py

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
import multiprocessing as mp
88
import time
99
from numpy.random import default_rng
10+
import platform
1011

1112
ST = time.time()
1213

@@ -79,7 +80,12 @@ def simGBM(s0=10, mu=0, sigma=0.2, r=0, T=1, dt=1 / 252, sims=1000, eps=None):
7980

8081
def _import_csimOU():
8182
dir = os.path.dirname(os.path.realpath(__file__)) + "/../" #+ "/c/"
82-
lib = ctypes.cdll.LoadLibrary(dir + "simOU.so")
83+
84+
ext = ".so"
85+
if platform.system() == 'Windows':
86+
ext = ".dll"
87+
88+
lib = ctypes.cdll.LoadLibrary(dir + "simOU" + ext)
8389
fun = lib.csimOU
8490
fun.restype = None
8591
fun.argtypes = [

src/simOU.so

32 Bytes
Binary file not shown.

0 commit comments

Comments
 (0)