diff --git a/balanced_random/balanced_random.py b/balanced_random/balanced_random.py index b61183f..2588add 100644 --- a/balanced_random/balanced_random.py +++ b/balanced_random/balanced_random.py @@ -22,8 +22,8 @@ p.set_number_of_neurons_per_core(p.IF_curr_exp, 64) p.set_number_of_neurons_per_core(p.SpikeSourcePoisson, 64) n_neurons = 500 -n_exc = int(round(n_neurons * 0.8)) -n_inh = int(round(n_neurons * 0.2)) +n_exc = round(n_neurons * 0.8) +n_inh = round(n_neurons * 0.2) weight_exc = 0.1 weight_inh = -5.0 * weight_exc weight_input = 0.001 diff --git a/balanced_random/split/balanced_random_split.py b/balanced_random/split/balanced_random_split.py index 6bf9a73..410b68b 100755 --- a/balanced_random/split/balanced_random_split.py +++ b/balanced_random/split/balanced_random_split.py @@ -22,8 +22,8 @@ p.set_number_of_neurons_per_core(p.IF_curr_exp, 64) p.set_number_of_neurons_per_core(p.SpikeSourcePoisson, 64) n_neurons = 500 -n_exc = int(round(n_neurons * 0.8)) -n_inh = int(round(n_neurons * 0.2)) +n_exc = round(n_neurons * 0.8) +n_inh = round(n_neurons * 0.2) weight_exc = 0.1 weight_inh = -5.0 * weight_exc weight_input = 0.001 diff --git a/examples/external_devices_examples/live_examples/balanced_random_live_rate.py b/examples/external_devices_examples/live_examples/balanced_random_live_rate.py index 1e0b27c..9cdcfb0 100644 --- a/examples/external_devices_examples/live_examples/balanced_random_live_rate.py +++ b/examples/external_devices_examples/live_examples/balanced_random_live_rate.py @@ -25,8 +25,8 @@ p.setup(timestep=0.1, time_scale_factor=10.0) p.set_number_of_neurons_per_core(p.SpikeSourcePoisson, 50) n_neurons = 500 -n_exc = int(round(n_neurons * 0.8)) -n_inh = int(round(n_neurons * 0.2)) +n_exc = round(n_neurons * 0.8) +n_inh = round(n_neurons * 0.2) weight_exc = 0.1 weight_inh = -5.0 * weight_exc weight_input = 0.001 diff --git a/examples/extra_models_examples/LGN_Izhikevich.py b/examples/extra_models_examples/LGN_Izhikevich.py index 1190781..694da8d 100644 --- a/examples/extra_models_examples/LGN_Izhikevich.py +++ b/examples/extra_models_examples/LGN_Izhikevich.py @@ -132,16 +132,16 @@ def print_synchrony(): """ Initialising Time and Frequency parameters """ # total duration of simulation -TotalDuration = int(1000) +TotalDuration = 1000 # this is in ms. -Duration_Inp = int(1000) +Duration_Inp = 1000 # 50 ms at both start and end are disregarded to avoid transients -Start_Inp = int(0) +Start_Inp = 0 End_Inp = int(Start_Inp + Duration_Inp) -Rate_Inp = int(22) +Rate_Inp = 22 Inp_isi = int(1000 / Rate_Inp) """ Initialising Model connectivity parameters """ diff --git a/examples/pynnBrunnel.py b/examples/pynnBrunnel.py index 4835c6a..9cd1551 100644 --- a/examples/pynnBrunnel.py +++ b/examples/pynnBrunnel.py @@ -34,8 +34,8 @@ v_rest = 0.0 tauSyn = 1.0 -N_E = int(round(Neurons * 0.8)) -N_I = int(round(Neurons * 0.2)) +N_E = round(Neurons * 0.8) +N_I = round(Neurons * 0.2) C_E = N_E * 0.1 C_I = N_I * 0.1 diff --git a/examples/split_examples/pynnBrunnelSplit.py b/examples/split_examples/pynnBrunnelSplit.py index 802f9df..0bc3df4 100755 --- a/examples/split_examples/pynnBrunnelSplit.py +++ b/examples/split_examples/pynnBrunnelSplit.py @@ -36,8 +36,8 @@ v_rest = 0.0 tauSyn = 1.0 -N_E = int(round(Neurons * 0.8)) -N_I = int(round(Neurons * 0.2)) +N_E = round(Neurons * 0.8) +N_I = round(Neurons * 0.2) C_E = N_E * 0.1 C_I = N_I * 0.1 diff --git a/examples/split_examples/va_benchmark_split.py b/examples/split_examples/va_benchmark_split.py index 3b95856..c42eaf2 100755 --- a/examples/split_examples/va_benchmark_split.py +++ b/examples/split_examples/va_benchmark_split.py @@ -92,7 +92,7 @@ Rm = 1e-6 / (g_leak * area) # membrane resistance in MΩ assert tau_m == cm * Rm # just to check -n_exc = int(round((n * r_ei / (1 + r_ei)))) # number of excitatory cells +n_exc = round((n * r_ei / (1 + r_ei))) # number of excitatory cells n_inh = n - n_exc # number of inhibitory cells print(n_exc, n_inh) diff --git a/examples/va_benchmark.py b/examples/va_benchmark.py index c50a075..0831665 100644 --- a/examples/va_benchmark.py +++ b/examples/va_benchmark.py @@ -95,8 +95,8 @@ Rm = 1e-6 / (g_leak * area) # membrane resistance in MΩ assert tau_m == cm * Rm # just to check -n_exc = int(round((n * r_ei / (1 + r_ei)))) # number of excitatory cells -n_inh = n - n_exc # number of inhibitory cells +n_exc = round((n * r_ei / (1 + r_ei))) # number of excitatory cells +n_inh = n - n_exc # number of inhibitory cells print(n_exc, n_inh) diff --git a/learning/random_dist.py b/learning/random_dist.py index c333cc5..24dfcf6 100644 --- a/learning/random_dist.py +++ b/learning/random_dist.py @@ -18,8 +18,8 @@ from pyNN.random import RandomDistribution n_neurons = 1000 -n_exc = int(round(n_neurons * 0.8)) -n_inh = int(round(n_neurons * 0.2)) +n_exc = round(n_neurons * 0.8) +n_inh = round(n_neurons * 0.2) simtime = 1000 sim.setup(timestep=0.1) diff --git a/spiNNaker_start/spinnaker_start.py b/spiNNaker_start/spinnaker_start.py index 8e80726..5ce7958 100644 --- a/spiNNaker_start/spinnaker_start.py +++ b/spiNNaker_start/spinnaker_start.py @@ -497,14 +497,14 @@ def set_ethernet_netinit_phase(self, x, y, phase): def set_ethernet_n_routes(self, x, y, n_routes): colour = self._get_max_value(x, y) max_n_routes = self._width * self._height - value = int(round((float(colour) / max_n_routes) * n_routes)) + value = round((float(colour) / max_n_routes) * n_routes) self._image_data[y, x] = [255 - value, 0, 255 - value] def add_cores(self, eth_x, eth_y, x, y, n_cores): colour = self._get_max_value(eth_x, eth_y) with self._update_lock: self._total_cores += n_cores - value = int(round((float(colour) / 18.0) * n_cores)) + value = round((float(colour) / 18.0) * n_cores) self._image_data[y, x] = [0, value, 0]