Skip to content

Commit e47401e

Browse files
authored
Merge pull request #98 from OpenSourceBrain/development
Fix for pathlib
2 parents e2bfcc4 + aa6b2dc commit e47401e

File tree

3 files changed

+10
-5
lines changed

3 files changed

+10
-5
lines changed

omv/analyzers/utils/timeseries.py

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
21
from omv.common.inout import inform
32

3+
44
def detect_spikes(v, method='threshold', threshold=0.):
55
from numpy import flatnonzero, bitwise_and, roll, diff, array
66

@@ -45,8 +45,13 @@ def load_spike_file(fname, format='ID_TIME', ids=0, scaling=1.0):
4545

4646
def compare_arrays(arrays, tolerance):
4747
from numpy import allclose, array, max, abs, atleast_1d
48-
49-
a1, a2 = array(arrays)
48+
49+
# if array conversion fails, also fail test
50+
try:
51+
a1, a2 = array(arrays)
52+
except ValueError as e:
53+
print(e)
54+
return (False, 0)
5055

5156
if (hasattr(a1, '__len__') or hasattr(a2, '__len__')) and len(a1)!=len(a2): # Different lengths!!
5257
return (False, 0)

omv/engines/pynn.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ def is_installed():
3232
def install(version=None):
3333
from omv.engines.getpynn import install_pynn
3434
home = os.environ['HOME']
35-
inform('Will fetch and install pyNN', indent=2)
35+
inform('Will fetch and install pyNN (version info: %s)'%version, indent=2)
3636
install_pynn(version)
3737
inform('Done, PyNN is correctly installed...', indent=2)
3838

setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,6 @@
2525
'PyYAML',
2626
'numpy',
2727
'pyrx',
28-
'pathlib',
28+
'pathlib; python_version<"3.4"',
2929
'docopt'],
3030
)

0 commit comments

Comments
 (0)