CPJKU/madmom

VisibleDeprecationWarning in downbeats.py - Creating an ndarray from ragged nested sequences is deprecated

jhurliman opened this issue · 1 comments

Expected behaviour

No deprecation warning

Actual behaviour

/usr/local/lib/python3.8/dist-packages/madmom/features/downbeats.py:287: VisibleDeprecationWarning: Creating an ndarray from ragged nested sequences (which is a list-or-tuple of lists-or-tuples-or ndarrays with different lengths or shapes) is deprecated. If you meant to do this, you must specify 'dtype=object' when creating the ndarray.
best = np.argmax(np.asarray(results)[:, 1])

Steps needed to reproduce the behaviour

With Python 3.8:

import numpy as np
from madmom.features.downbeats import DBNDownBeatTrackingProcessor, RNNDownBeatProcessor

audio = np.random.rand(44100 * 10)
activations = RNNDownBeatProcessor()(audio)
beats_and_indices = DBNDownBeatTrackingProcessor(beats_per_bar=4, fps=100)(activations)

Information about installed software

>>> madmom.__version__
'0.16.1'
>>> np.__version__
'1.23.5'
>>> scipy.__version__
'1.10.0'

same this is when i install madmom from github clone