As stated in issue 5289, tempo, _ = beat.beat_track(y=y, sr=sr) was assigning a numpy.ndarray to tempo. Trying to use Pythons built-in round() method doesn't work, so as suggested in the issue, this PR changes the line to use numpy.round() instead to get the BPM from the returning value.
We could make the fix more elaborate, as beat.beat_track() returns either a float or numpy.ndarray.
Librosa docs: beat.beat_track()
Description
Fixes #5289
As stated in issue 5289,
tempo, _ = beat.beat_track(y=y, sr=sr)
was assigning a numpy.ndarray totempo
. Trying to use Pythons built-inround()
method doesn't work, so as suggested in the issue, this PR changes the line to usenumpy.round()
instead to get the BPM from the returning value.We could make the fix more elaborate, as
beat.beat_track()
returns either a float or numpy.ndarray. Librosa docs: beat.beat_track()To Do