-
Notifications
You must be signed in to change notification settings - Fork 92
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Bug] IndexError in spike_train_synchrony.py, annotate_synchrofacts #493
Comments
Update 20.10.2023: the following is no longer up to date, see latest comments elephant/elephant/spike_train_synchrony.py Lines 399 to 407 in 0df4581
|
Hi!
|
This error can however also be caused by
I see multiple options for addressing this:
Either way we also need to make this issue more clear in the documentation of the function. |
The issue could be traced to the following: Thanks @skrausse who posted on INM-6/elephant: [...] @jo460464 already found the relevant code in the complexity class, where the t_stop bin is excluded and therefore leads to a failure. elephant/elephant/statistics.py Lines 1418 to 1446 in 0354d0e
Shifting the bins by half a sampling period leaves events at t_stop to be out of bounds. |
Discussion at elephant meeting (23.10.23):
|
We also discussed the suggested changes on branch: https://github.com/jo460464/elephant/tree/enh/iss101 |
This Bug was originally discovered by @skrausse , thank you for reporting.
Describe the bug
When trying to use the
delete_synchrofacts
method fromSynchrotool
class inspike_train_synchrony.py
, in specific cases an IndexError is raised.To Reproduce
Gives the following error messages: (if
np.random.seed(1)
, if the random seed is set to 2 , no error is raised)Expected behavior
Index should not be out of bounds
Environment
conda
,pip
, source): pip, sourceneo
python package version: 0.10.2elephant
python package version: 0.11.0quantities
: 0.13.0numpy
: 1.22.3The text was updated successfully, but these errors were encountered: