cosmir / openmic-2018

Tools and tutorials for the OpenMIC-2018 dataset.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Fix numpy indexing in vggish.inputs.waveform_to_examples

ejhumphrey opened this issue · comments

something in waveform_to_examples is throwing a numpy (1.15) warning:

tests/test_openmic_vggish_inputs.py::test_soundfile_to_examples
  /usr/local/opt/miniconda3/envs/py36_openmic/lib/python3.6/site-packages/mkl_fft/_numpy_fft.py:331: FutureWarning: Using a non-tuple sequence for multidimensional indexing is deprecated; use `arr[tuple(seq)]` instead of `arr[seq]`. In the future this will be interpreted as an array index, `arr[np.array(seq)]`, which will result either in an error or a different result.
    output = mkl_fft.rfft_numpy(a, n=n, axis=axis)

Traceback isn't super helpful in determining what exactly is causing it ... either mel_features.log_mel_spectrogram, mel_features.frame, or resampy.resample. Not super important, but would be neat to fix

This is upstream of us. The mkl fft implementation has not yet been updated to handle future deprecations for fancy indexing of ndarrays. I've hit this already in librosa when future-proofing against numpy 1.15 -- feel free to tag as won't-fix.