본문 바로가기
기술관련 기록

DeprecationWarning: `np.float` is a deprecated alias for the builtin `float`

by 저녁추천좀 2021. 8. 13.
DeprecationWarning: \`np.float\` is a deprecated alias for the builtin \`float\`. To silence this warning, use \`float\` by itself. Doing this will not modify any behavior and is safe. If you specifically wanted the numpy scalar type, use \`np.float64\` here. Deprecated in NumPy 1.20; for more details and guidance: [https://numpy.org/devdocs/release/1.20.0](https://numpy.org/devdocs/release/1.20.0)ㅡ notes.html#deprecations
  • Solution
 spec = librosa.stft(mixed,window='hann',n_fft=n_fft,hop_length=n_shift, win_length=None,center=False)

=>

spec = librosa.stft(mixed,window='hann',n_fft=n_fft,hop_length=n_shift, win_length=None,center=False,dtype=np.cdouble)