beets
beets copied to clipboard
Fix for #5289
Description
Fixes #5289
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()
To Do
- [x] Documentation.
- [x] Changelog.
- [x] Tests.
Thank you for the PR! The changelog has not been updated, so here is a friendly reminder to check if you need to add an entry.
Superseded by #5389