Skip to content

Commit

Permalink
Merge pull request #162 from zm711/dep-fixes
Browse files Browse the repository at this point in the history
Fix numpy deprecations
  • Loading branch information
alejoe91 authored Sep 22, 2023
2 parents edc502d + 2874db8 commit c2f394a
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
3 changes: 3 additions & 0 deletions src/MEArec/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -405,6 +405,9 @@ def gen_recordings(params, **kwargs):
if kwargs["filt_cutoff"] is not None:
if isinstance(kwargs["filt_cutoff"], tuple):
kwargs["filt_cutoff"] = list(kwargs["filt_cutoff"])
# for high-pass filter, make a scalar
if len(kwargs["filt_cutoff"]) == 1:
kwargs["filt_cutoff"] = kwargs["filt_cutoff"][0]
params_dict["recordings"]["filter_cutoff"] = kwargs["filt_cutoff"]
if kwargs["filt_order"] is not None:
params_dict["recordings"]["filt_order"] = kwargs["filt_order"]
Expand Down
2 changes: 1 addition & 1 deletion src/MEArec/simulate_cells.py
Original file line number Diff line number Diff line change
Expand Up @@ -1107,7 +1107,7 @@ def get_rnd_rot_Arvo():
random rotation matrix
"""
gamma = np.random.uniform(0, 2.0 * np.pi)
rotation_z = np.matrix([[np.cos(gamma), -np.sin(gamma), 0], [np.sin(gamma), np.cos(gamma), 0], [0, 0, 1]])
rotation_z = np.array([[np.cos(gamma), -np.sin(gamma), 0], [np.sin(gamma), np.cos(gamma), 0], [0, 0, 1]])
x = np.random.uniform(size=2)
v = np.array(
[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])]
Expand Down

0 comments on commit c2f394a

Please sign in to comment.