Skip to content

Commit 5d73426

Browse files
committed
fix deprecated np.complex to np.complex128
1 parent 231e2ae commit 5d73426

2 files changed

Lines changed: 2 additions & 2 deletions

File tree

pytsmod/pvtsm.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ def phase_vocoder(x, s, win_type='sin', win_size=2048, syn_hop_size=512,
6060
X = stft(x_chan, ana_hop=aw_pos, win_type=win_type,
6161
win_size=win_size, zero_pad=zero_pad, fft_shift=fft_shift)
6262

63-
Y = np.zeros(X.shape, dtype=np.complex)
63+
Y = np.zeros(X.shape, dtype=np.complex128)
6464
Y[:, 0] = X[:, 0] # phase initialization
6565

6666
N = win_size + zero_pad

pytsmod/utils/stft.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ def stft(x, ana_hop=2048, win_type='hann', win_size=4096, zero_pad=0, sr=44100,
5353
num_frames = ana_hop.size
5454
win_pos = ana_hop[0:num_frames]
5555

56-
spec = np.zeros((win_size // 2 + 1, num_frames), dtype=np.complex)
56+
spec = np.zeros((win_size // 2 + 1, num_frames), dtype=np.complex128)
5757
for i in range(num_frames):
5858
xi = x_padded[win_pos[i]: win_pos[i] + win_size] * win
5959

0 commit comments

Comments
 (0)