Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix numpy deprecations #162

Merged
merged 4 commits into from
Sep 22, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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]
alejoe91 marked this conversation as resolved.
Show resolved Hide resolved
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
Loading