You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Feature
Move the _check_consistency_of_spiketrainlist() from elephant.statistics to utils or somewhere where it can be accessed by all modules.
Also make this function check for a list of length 0.
Motivation @Kleinjohann noticed this could be helpful when working on PR #322, because we also wrote a very similar function in the new spike_train_processing module. I also noticed while working on #324 that having this input checking utility function would make the implementation of a new feature much easier with less new tests required.
Additional context
Actually this would be a good moment also to go through all of the checks and collect them all into a set of functions (also for analogsignals and other inputs). It could simplify the code, since the new functions could be tested on their own and many tests would not need to specificly provide 'wrong' input to check that it raises the right error.
The text was updated successfully, but these errors were encountered:
Feel free to modify it in either of the abovementioned pull requests.
Usually, I do it by need. It's totally OK to slightly modify unrelated modules in a PR just to generalize the code.
Actually this would be a good moment also to go through all of the checks and collect them all into a set of functions (also for analogsignals and other inputs).
The reason why I don't do this is that I don't want to touch the stuff I've not checked yet (most of elephant functional). I don't see the big picture, that's why I do it rather step by step.
Feature
Move the
_check_consistency_of_spiketrainlist()
fromelephant.statistics
toutils
or somewhere where it can be accessed by all modules.Also make this function check for a list of length 0.
Motivation
@Kleinjohann noticed this could be helpful when working on PR #322, because we also wrote a very similar function in the new
spike_train_processing
module. I also noticed while working on #324 that having this input checking utility function would make the implementation of a new feature much easier with less new tests required.Additional context
Actually this would be a good moment also to go through all of the checks and collect them all into a set of functions (also for analogsignals and other inputs). It could simplify the code, since the new functions could be tested on their own and many tests would not need to specificly provide 'wrong' input to check that it raises the right error.
The text was updated successfully, but these errors were encountered: