Skip to content

Commit

Permalink
add comments
Browse files Browse the repository at this point in the history
  • Loading branch information
Moritz-Alexander-Kern committed Jan 8, 2025
1 parent f6580e0 commit a406a79
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion elephant/test/test_statistics.py
Original file line number Diff line number Diff line change
Expand Up @@ -1098,8 +1098,10 @@ def test_time_histogram_regression_648_single_spiketrain(self):

# Wrap spiketrain in a list and run time_histogram
histogram_wrapped = statistics.time_histogram([spiketrain], output='rate', bin_size=0.5 * pq.s)
# Check if passing a single spiketrain directly vs in a list gives same result
np.testing.assert_array_equal(histogram_direct.magnitude, histogram_wrapped.magnitude)
np.testing.assert_array_equal(histogram_wrapped.magnitude.flatten(), [2., 2., 2., 2., 2., 0.]*pq.Hz)
# Check if the spike rate calculation is correct for a single spike train
np.testing.assert_array_equal(histogram_direct.magnitude.flatten(), [2., 2., 2., 2., 2., 0.]*pq.Hz)


class ComplexityTestCase(unittest.TestCase):
Expand Down

0 comments on commit a406a79

Please sign in to comment.