summaryrefslogtreecommitdiff
path: root/pyspike/cython/cython_profiles.pyx
diff options
context:
space:
mode:
Diffstat (limited to 'pyspike/cython/cython_profiles.pyx')
-rw-r--r--pyspike/cython/cython_profiles.pyx2
1 files changed, 1 insertions, 1 deletions
diff --git a/pyspike/cython/cython_profiles.pyx b/pyspike/cython/cython_profiles.pyx
index eb4d157..aa24db4 100644
--- a/pyspike/cython/cython_profiles.pyx
+++ b/pyspike/cython/cython_profiles.pyx
@@ -473,7 +473,7 @@ def coincidence_single_profile_cython(double[:] spikes1, double[:] spikes2,
if j > -1 and fabs(spikes1[i]-spikes2[j]) < tau:
# current spike in st1 is coincident
c[i] = 1
- if j < N2-1 and spikes2[j] < spikes1[i]:
+ if j < N2-1 and (j < 0 or spikes2[j] < spikes1[i]):
# in case spikes2[j] is before spikes1[i] it has to be the one
# right before (see above), hence we move one forward and also
# check the next spike