Skip to content
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

fixed bugs in joint-ISI and shuffle ISI #364

Merged
merged 3 commits into from
Oct 23, 2020

Conversation

pbouss
Copy link
Contributor

@pbouss pbouss commented Oct 22, 2020

I fixed the bugs appearing when preparing the elephant workshop.

First, I spike exactly at t_stop.
Secondly, spike trains with nor properly ordered spikes.

I added the examples originally producing the bugs in the tests.

By the way, the decimals of shuffle_isi can produce bugs, since the units for this are not specified.

@pep8speaks
Copy link

pep8speaks commented Oct 22, 2020

Hello @pbouss! Thanks for updating this PR. We checked the lines you've touched for PEP 8 issues, and found:

There are currently no PEP 8 issues detected in this Pull Request. Cheers! 🍻

Comment last updated at 2020-10-23 08:09:01 UTC

@coveralls
Copy link
Collaborator

coveralls commented Oct 22, 2020

Coverage Status

Coverage increased (+0.01%) to 89.912% when pulling 83e6691 on INM-6:fix/joint_isi_shuffle_isi into a0ca215 on NeuralEnsemble:master.

Copy link
Member

@dizcza dizcza left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

By the way, the decimals of shuffle_isi can produce bugs, since the units for this are not specified.
Why? decimals should be an int, not a quantity - the .round function accepts integers.

There are a few important notes for you about programming that I decided to describe them here. You don't need to worry this time - I fixed them.

t_start=spiketrain.t_start,
t_stop=spiketrain.t_stop,
sampling_rate=spiketrain.sampling_rate)
] * n_surrogates
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[...] * n creates a list of n references to the same object unless the object is a primitive (float or int). Avoid doing so for complex objects. It's always better to create n copies rather than n references.

elephant/spike_train_surrogates.py Show resolved Hide resolved
@dizcza dizcza merged commit 1d48a77 into NeuralEnsemble:master Oct 23, 2020
@dizcza dizcza deleted the fix/joint_isi_shuffle_isi branch October 23, 2020 08:57
@dizcza dizcza added the bugfix Fix for an indentified bug. label Oct 23, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bugfix Fix for an indentified bug.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants