Skip to content

Commit 2626094

Browse files
committed
Update simulate.py
1 parent 3a2be39 commit 2626094

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

replay_trajectory_classification/simulate.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,9 @@ def simulate_position_with_pauses(
9696
return pause_position[: time.size]
9797

9898

99-
def simulate_poisson_spikes(rate: NDArray[np.float64], sampling_frequency: int) -> NDArray[np.float64]:
99+
def simulate_poisson_spikes(
100+
rate: NDArray[np.float64], sampling_frequency: int
101+
) -> NDArray[np.bool_]:
100102
"""Given a rate, returns a time series of spikes.
101103
102104
Parameters
@@ -106,7 +108,7 @@ def simulate_poisson_spikes(rate: NDArray[np.float64], sampling_frequency: int)
106108
107109
Returns
108110
-------
109-
spikes : NDArray[np.float64], shape (n_time,)
111+
spikes : NDArray[np.bool_], shape (n_time,)
110112
111113
"""
112114
return 1.0 * (np.random.poisson(rate / sampling_frequency) > 0)

0 commit comments

Comments
 (0)