Skip to content

Commit 6f2c3da

Browse files
committed
update numpy pad signature
numpy.lib.pad => numpy.pad
1 parent 650f3ed commit 6f2c3da

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

inaSpeechSegmenter/sidekit_mfcc.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -254,11 +254,11 @@ def framing(sig, win_size, win_shift=1, context=(0, 0), pad='zeros'):
254254
shape = (int((sig.shape[0] - win_size) / win_shift) + 1, 1, _win_size, sig.shape[1])
255255
strides = tuple(map(lambda x: x * dsize, [win_shift * sig.shape[1], 1, sig.shape[1], 1]))
256256
if pad == 'zeros':
257-
return numpy.lib.stride_tricks.as_strided(numpy.lib.pad(sig, c, 'constant', constant_values=(0,)),
257+
return numpy.lib.stride_tricks.as_strided(numpy.pad(sig, c, 'constant', constant_values=(0,)),
258258
shape=shape,
259259
strides=strides).squeeze()
260260
elif pad == 'edge':
261-
return numpy.lib.stride_tricks.as_strided(numpy.lib.pad(sig, c, 'edge'),
261+
return numpy.lib.stride_tricks.as_strided(numpy.pad(sig, c, 'edge'),
262262
shape=shape,
263263
strides=strides).squeeze()
264264

0 commit comments

Comments
 (0)