This pull request addresses issue #648 by updating the statistics.time_histogram function to accept a single neo.SpikeTrain object as input.
Previously, the function was limited to handling lists of spike trains, which led to incorrect results when a single spike train was provided. This enhancement ensures that the function now correctly computes the time histogram for both single and multiple spike trains.
Changes
Modified the time_histogram function to handle a single neo.SpikeTrain input.
The documentation has been updated to reflect this new capability. It now clearly states that the function can accept both a list of spike trains and a single spike train.
Added a regression test to ensure that the functionality works as intended for both single and multiple spike trains.
Added type hints to time_histogram
Removed copy parameter when creating pq.Quantity object
coverage: 88.257% (-0.1%) from 88.401%
when pulling 9c06d0d02010e3f559fefcd87648f0a7401b28a9 on INM-6:fix/time_histogram_648
into 123ca040b11a5961643c4de080df89af9b1fcd24 on NeuralEnsemble:master.
This pull request addresses issue #648 by updating the
statistics.time_histogram
function to accept a singleneo.SpikeTrain
object as input.Previously, the function was limited to handling lists of spike trains, which led to incorrect results when a single spike train was provided. This enhancement ensures that the function now correctly computes the time histogram for both single and multiple spike trains.
Changes
time_histogram
copy
parameter when creatingpq.Quantity
object