Skip to content

Commit f045ef2

Browse files
committed
fix numpy deprecations
1 parent a95f00b commit f045ef2

2 files changed

Lines changed: 3 additions & 3 deletions

File tree

src/MEArec/generators/recordinggenerator.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1410,9 +1410,9 @@ def generate_recordings(
14101410

14111411
# compute pad samples as 3 times the low-cutoff period
14121412
if cutoff.size == 1:
1413-
pad_samples_filt = 3 * int((1.0 / cutoff * fs).magnitude)
1413+
pad_samples_filt = 3 * int((1.0 / cutoff * fs).magnitude[0])
14141414
elif cutoff.size == 2:
1415-
pad_samples_filt = 3 * int((1.0 / cutoff[0] * fs).magnitude)
1415+
pad_samples_filt = 3 * int((1.0 / cutoff[0] * fs).magnitude[0])
14161416

14171417
# call the loop on chunks
14181418
args = (

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)