Skip to content

Commit c2f394a

Browse files
authored
Merge pull request #162 from zm711/dep-fixes
Fix numpy deprecations
2 parents edc502d + 2874db8 commit c2f394a

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

src/MEArec/cli.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -405,6 +405,9 @@ def gen_recordings(params, **kwargs):
405405
if kwargs["filt_cutoff"] is not None:
406406
if isinstance(kwargs["filt_cutoff"], tuple):
407407
kwargs["filt_cutoff"] = list(kwargs["filt_cutoff"])
408+
# for high-pass filter, make a scalar
409+
if len(kwargs["filt_cutoff"]) == 1:
410+
kwargs["filt_cutoff"] = kwargs["filt_cutoff"][0]
408411
params_dict["recordings"]["filter_cutoff"] = kwargs["filt_cutoff"]
409412
if kwargs["filt_order"] is not None:
410413
params_dict["recordings"]["filt_order"] = kwargs["filt_order"]

src/MEArec/simulate_cells.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1107,7 +1107,7 @@ def get_rnd_rot_Arvo():
11071107
random rotation matrix
11081108
"""
11091109
gamma = np.random.uniform(0, 2.0 * np.pi)
1110-
rotation_z = np.matrix([[np.cos(gamma), -np.sin(gamma), 0], [np.sin(gamma), np.cos(gamma), 0], [0, 0, 1]])
1110+
rotation_z = np.array([[np.cos(gamma), -np.sin(gamma), 0], [np.sin(gamma), np.cos(gamma), 0], [0, 0, 1]])
11111111
x = np.random.uniform(size=2)
11121112
v = np.array(
11131113
[np.cos(2.0 * np.pi * x[0]) * np.sqrt(x[1]), np.sin(2.0 * np.pi * x[0]) * np.sqrt(x[1]), np.sqrt(1 - x[1])]

0 commit comments

Comments
 (0)