FutureWarning when calling librosa.display.specshow()
See original GitHub issueDescription
When trying to calculate and then plot the mfccs of a wav file, an error message appears and no mfcc plot
Steps/Code to Reproduce
y, sr = librosa.load(‘~/PycharmProjects/MA/Roland-JV-2080-PizzicatoStr-C5.wav/’)
hop_length = 512
mfccs = librosa.feature.mfcc(y=y, sr=sr, hop_length=hop_length, n_mfcc=13)
plt.figure(figsize=(10, 4)) librosa.display.specshow(mfccs, x_axis=‘time’) plt.colorbar() plt.title(‘MFCC’) plt.tight_layout()
Expected Results
Plot of MFCCs
Actual Results
Error message and no plot:
/Users/aleksandar/PycharmProjects/MA/venv/lib/python3.6/site-packages/librosa/display.py:656: FutureWarning: Conversion of the second argument of issubdtype from complex
to np.complexfloating
is deprecated. In future, it will be treated as np.complex128 == np.dtype(complex).type
. if np.issubdtype(data.dtype, np.complex):
Checking the variables, the mfccs have been calculated properly.
Versions
Darwin-17.3.0-x86_64-i386-64bit Python 3.6.4 (v3.6.4:d48ecebad5, Dec 18 2017, 21:07:28) [GCC 4.2.1 (Apple Inc. build 5666) (dot 3)] NumPy 1.14.0 Python 3.6.4 (v3.6.4:d48ecebad5, Dec 18 2017, 21:07:28) Type ‘copyright’, ‘credits’ or ‘license’ for more information IPython 6.2.1 – An enhanced Interactive Python. Type ‘?’ for help. SciPy 1.0.0 librosa 0.5.1 PyDev console: using IPython 6.2.1
Issue Analytics
- State:
- Created 6 years ago
- Comments:7 (5 by maintainers)
Top GitHub Comments
Yeah, think so.
@bmcfee yeah that was missing, I just copy pasted… thank you… omg it’s so embarrassing haha, that’s why I tried it in the google group first… Sorry I am a beginner 😃
But is there any chance to not get the warning?