Skip to content

Commit f2736fa

Browse files
committed
[bench] make sure benchmark scripts can find the local jdata
1 parent 61283b1 commit f2736fa

File tree

2 files changed

+9
-2
lines changed

2 files changed

+9
-2
lines changed

benchmark/benchcodecs.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,13 @@
11
"""
22
Speed benchmark for saving/loading numpy arrays using various compression codecs
33
"""
4-
import jdata as jd
5-
import numpy as np
64
import time
75
import os
6+
import numpy as np
7+
8+
sys.path.insert(0, os.path.abspath(os.path.join(os.path.dirname(__file__), "..")))
9+
10+
import jdata as jd
811

912
print("jdata version:" + jd.__version__)
1013

benchmark/benchnifti.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
import time
22
import os
3+
import sys
34
import glob
45
import urllib.request
56
import zipfile
@@ -8,6 +9,9 @@
89

910
import nibabel as nib
1011
import numpy as np
12+
13+
sys.path.insert(0, os.path.abspath(os.path.join(os.path.dirname(__file__), "..")))
14+
1115
import jdata as jd
1216

1317
tempdir = tempfile.mkdtemp()

0 commit comments

Comments
 (0)