Skip to content

Commit a406a79

Browse files
add comments
1 parent f6580e0 commit a406a79

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

elephant/test/test_statistics.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1098,8 +1098,10 @@ def test_time_histogram_regression_648_single_spiketrain(self):
10981098

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

11041106

11051107
class ComplexityTestCase(unittest.TestCase):

0 commit comments

Comments
 (0)