From 2ca43d0a3f2587c64becd6d5b3b815d0c12f846d Mon Sep 17 00:00:00 2001 From: vvbragin Date: Fri, 5 Jul 2024 14:03:05 +0200 Subject: [PATCH] fixed generating rhythmic spiking pattern with 'uniform' option --- CHANGES.md | 2 ++ netpyne/cell/inputs.py | 4 +++- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/CHANGES.md b/CHANGES.md index 80ae1800b..ec8313735 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -20,6 +20,8 @@ - Fixed a bug in `gatherDataFromFiles()` where cellGids for node 0 were lost +- Fixed generating rhythmic spiking pattern with 'uniform' option + # Version 1.0.6 **New features** diff --git a/netpyne/cell/inputs.py b/netpyne/cell/inputs.py index 6ea1dcd99..53109e4dc 100644 --- a/netpyne/cell/inputs.py +++ b/netpyne/cell/inputs.py @@ -89,7 +89,9 @@ def createRhythmicPattern(params, rand): # Uniform Distribution elif distribution == 'uniform': n_inputs = params['repeats'] * freq * (stop - start) / 1000.0 - t_array = rand.uniform(start, stop, int(n_inputs)) + rand.uniform(start, stop) + vec = h.Vector(int(n_inputs)) + t_array = np.array(vec.setrand(rand)) if eventsPerCycle == 2: # Two arrays store doublet times t_input_low = t_array - 5