beets icon indicating copy to clipboard operation
beets copied to clipboard

Fix for #5289

Open tumbleboy opened this issue 1 year ago • 1 comments

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.

tumbleboy avatar Jun 18 '24 03:06 tumbleboy

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.

github-actions[bot] avatar Jun 18 '24 03:06 github-actions[bot]

Superseded by #5389

snejus avatar Sep 12 '24 14:09 snejus