1From 902bcca8cfc84801cf93a6c3ca59da283072a79f Mon Sep 17 00:00:00 2001
2From: Emily <hello@emily.moe>
3Date: Wed, 27 Aug 2025 18:58:07 +0100
4Subject: [PATCH] Fix types in beat tracking code
5
6The development version of Numba 0.62.0 is unhappy about `range`
7being applied to floating point values here.
8---
9 librosa/beat.py | 2 +-
10 1 file changed, 1 insertion(+), 1 deletion(-)
11
12diff --git a/librosa/beat.py b/librosa/beat.py
13index 1a19005d..4ed9e945 100644
14--- a/librosa/beat.py
15+++ b/librosa/beat.py
16@@ -582,7 +582,7 @@ def __beat_track_dp(localscore, frames_per_beat, tightness, backlink, cumscore):
17 # Search over all possible predecessors to find the best preceding beat
18 # NOTE: to provide time-varying tempo estimates, we replace
19 # frames_per_beat[0] by frames_per_beat[i] in this loop body.
20- for loc in range(i - np.round(frames_per_beat[tv * i] / 2), i - 2 * frames_per_beat[tv * i] - 1, - 1):
21+ for loc in range(i - round(frames_per_beat[tv * i] / 2), int(i - 2 * frames_per_beat[tv * i] - 1), - 1):
22 # Once we're searching past the start, break out
23 if loc < 0:
24 break
25--
262.50.1
27