Skip to content

Commit

Permalink
removed deprecated np.int with int
Browse files Browse the repository at this point in the history
  • Loading branch information
javanasse authored Feb 26, 2024
1 parent be9c5cf commit 491f501
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions worldvocoder/d4c.py
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ def get_windowed_waveform(x: np.ndarray, fs: int, current_f0: float,
base_index = np.arange(-half_window_length, half_window_length + 1)
index = int(current_position * fs + 0.501) + 1.0 + base_index
safe_index = np.minimum(len(x), np.maximum(1, round_matlab(index)))
safe_index = np.array(safe_index, dtype=np.int)
safe_index = np.array(safe_index, dtype=int)
# wave segments and set of windows preparation
segment = x[safe_index - 1]
time_axis = base_index / fs / half_length + \
Expand Down Expand Up @@ -257,4 +257,4 @@ def round_matlab(x: np.ndarray) -> np.ndarray:
y = x.copy()
y[x > 0] += 0.5
y[x <= 0] -= 0.5
return y
return y

0 comments on commit 491f501

Please sign in to comment.