Skip to content

Commit

Permalink
Fix error that random seed is not set when using SpikeGenerator(seed=0)
Browse files Browse the repository at this point in the history
  • Loading branch information
chenziao committed Apr 20, 2024
1 parent aa16f2e commit bbd03c2
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion bmtk/utils/reports/spike_trains/spike_trains.py
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ def __init__(self, population=None, seed=None, output_units='ms', **kwargs):
if population is not None and 'default_population' not in kwargs:
kwargs['default_population']= population

if seed:
if seed is not None:
np.random.seed(seed)

super(SpikeGenerator, self).__init__(units=output_units, **kwargs)
Expand Down

0 comments on commit bbd03c2

Please sign in to comment.