Skip to content

Commit

Permalink
Merge pull request #3227 from otcathatsya/fix_np2.0
Browse files Browse the repository at this point in the history
More numpy 2.0 syntax fixes
  • Loading branch information
heplesser authored Jun 20, 2024
2 parents 66da345 + 33ff34a commit 1af4ab7
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions pynest/examples/Potjans_2014/network.py
Original file line number Diff line number Diff line change
Expand Up @@ -424,11 +424,11 @@ def __connect_neuronal_populations(self):
conn_dict_rec = {"rule": "fixed_total_number", "N": self.num_synapses[i][j]}

if self.weight_matrix_mean[i][j] < 0:
w_min = np.NINF
w_min = -np.inf
w_max = 0.0
else:
w_min = 0.0
w_max = np.Inf
w_max = np.inf

syn_dict = {
"synapse_model": "static_synapse",
Expand All @@ -449,7 +449,7 @@ def __connect_neuronal_populations(self):
# https://nest-simulator.readthedocs.io/en/latest/nest_behavior
# /random_numbers.html#rounding-effects-when-randomizing-delays
min=nest.resolution - 0.5 * nest.resolution,
max=np.Inf,
max=np.inf,
),
}

Expand Down Expand Up @@ -498,7 +498,7 @@ def __connect_thalamic_stim_input(self):
"weight": nest.math.redraw(
nest.random.normal(mean=self.weight_th, std=self.weight_th * self.net_dict["weight_rel_std"]),
min=0.0,
max=np.Inf,
max=np.inf,
),
"delay": nest.math.redraw(
nest.random.normal(
Expand All @@ -509,7 +509,7 @@ def __connect_thalamic_stim_input(self):
# https://nest-simulator.readthedocs.io/en/latest/nest_behavior
# /random_numbers.html#rounding-effects-when-randomizing-delays
min=nest.resolution - 0.5 * nest.resolution,
max=np.Inf,
max=np.inf,
),
}

Expand Down

0 comments on commit 1af4ab7

Please sign in to comment.