question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

FutureWarning when calling librosa.display.specshow()

See original GitHub issue

Description

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:closed
  • Created 6 years ago
  • Comments:7 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
carlthomecommented, Feb 5, 2018

Yeah, think so.

1reaction
aleksandreviccommented, Jan 10, 2018

@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?

Read more comments on GitHub >

github_iconTop Results From Across the Web

FutureWarning of librosa!: From version 0.10 passing these as ...
I ran into the same warning when creating melspectrogram, and after a little searching, I found the solution for me.
Read more >
librosa.display.specshow — librosa 0.10.0.dev0 documentation
Display a spectrogram/chromagram/cqt/etc. Sample rate used to determine time scale in x-axis. Number of samples per frame in STFT/spectrogram displays. By ...
Read more >
Data exploration and modeling with Librosa | Kaggle
Explore and run machine learning code with Kaggle Notebooks | Using data from multiple data sources.
Read more >
How to Process Audio on Your GPU with TensorFlow.ipynb ...
warnings.filterwarnings('ignore', category=FutureWarning) ... import librosa as lr ... lr.display.specshow(log_magnitude_mel_spectrograms[_ID].numpy().T,
Read more >
Librosa Mel Spectrogram Hz Scaling Issue - ADocLib
... to remember and call random functions like librosa.display.specshow with. ... [ci s FutureWarning when calling librosa.display.specshow functionality.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found