Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix for #5289 #5322

Draft
wants to merge 2 commits into
base: master
Choose a base branch
from
Draft

Fix for #5289 #5322

wants to merge 2 commits into from

Conversation

tumbleboy
Copy link

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

  • Documentation.
  • Changelog.
  • Tests.

Copy link

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Error in autobpm module (at least with Python 3.7)
1 participant