-
Notifications
You must be signed in to change notification settings - Fork 930
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
beat.beat_track gives error: ufunc '_cabs2' did not contain a loop #1675
Comments
Please fill out the issue template correctly with details about your environment. I was able to run (more or less) the example as described with the 0.10.0 release: In [1]: import librosa
In [2]: y, sr = librosa.load(librosa.ex('nutcracker'))
In [3]: yh, yp = librosa.effects.hpss(y)
In [4]: yp
Out[4]:
array([ 1.3060981e-06, 3.4135082e-06, -4.7504541e-06, ...,
4.0520217e-06, 7.1086342e-06, 3.9290107e-06], dtype=float32)
In [5]: librosa.beat.beat_track(y=yp, sr=sr)
Out[5]:
(
107.666015625,
array([ 51, 74, 100, 124, 149, 173, 198, 221, 246, 270, 295,
319, 344, 367, 393, 415, 439, 461, 485, 507, 531, 554,
577, 600, 623, 646, 669, 692, 716, 739, 762, 785, 807,
831, 855, 877, 900, 923, 946, 969, 993, 1015, 1038, 1061,
1085, 1107, 1131, 1155, 1178, 1201, 1225, 1248, 1272, 1296, 1320,
1344, 1368, 1392, 1414, 1437, 1460, 1483, 1505, 1527, 1550, 1573,
1595, 1618, 1641, 1664, 1688, 1712, 1735, 1758, 1782, 1806, 1829,
1852, 1876, 1900, 1924, 1947, 1971, 1994, 2018, 2041, 2064, 2087,
2110, 2132, 2155, 2177, 2200, 2222, 2244, 2266, 2289, 2312, 2335,
2357, 2380, 2404, 2427, 2451, 2474, 2498, 2521, 2544, 2568, 2592,
2615, 2638, 2661, 2684, 2706, 2728, 2752, 2775, 2797, 2819, 2842,
2864, 2887, 2910, 2933, 2955, 2978, 3001, 3024, 3050, 3075, 3100,
3125, 3150, 3174, 3199, 3223, 3246, 3269, 3295, 3317, 3340, 3362,
3385, 3409, 3432, 3456, 3480, 3508, 3533, 3560, 3585, 3612, 3637,
3663, 3688, 3714, 3740, 3766, 3791, 3816, 3841, 3866, 3890, 3915,
3940, 3965, 3989, 4014, 4038, 4063, 4087, 4111, 4135, 4159, 4183,
4208, 4231, 4255, 4279, 4304, 4327, 4351, 4374, 4399, 4422, 4447,
4471, 4495, 4519, 4543, 4567, 4590, 4614, 4638, 4662, 4686, 4709,
4734, 4758, 4781, 4805, 4829, 4853, 4877, 4901, 4925, 4949, 4973,
4997, 5021])
) |
I am on Mac OS Venture 13.2. Using python 3.10.2 and librosa 0.10.0. Running everything via VS code. |
Can you please include the output of |
Of course
|
Thanks - that's very strange. The error you're reporting indicates that the abs2 helper is not defined for complex128, but this is explicitly so here: Lines 2472 to 2477 in 1f770e8
I suspected a numba issue was the cause, but we're on the same version (0.56.4), so that can't be it. Are you able to run the example code snippets in the |
I can't. here is the output
and
|
Ok, thanks for checking. I'm rather stumped here, as I've been unable to replicate this behavior. The only substantive difference between our environments that I can see is numpy 1.22.2 (yours) vs 1.23.5 (mine). However, nothing in the release notes (or my understanding of how these things work) suggests a change that would produce this behavior, and we do include numpy==1.20.3 and numba==0.51.0 in our minimal dependency test environment (which works). The only other thing that comes to mind is that it appears that you've installed librosa in a system-wide environment (as super-user?), and that does occasionally cause trouble with numba when it can't cache the compiled function objects on disk. Usually this looks more like an indefinite hang on import, but I wonder if the behavior you're seeing is related? We could test this hypothesis by changing the |
Good news, I have upgraded numpy and numba. Now it works! Thank you for the helping me out. |
Huh, well i'm glad it's working! But it would be nice to know what the problem was. I'll close this issue for now, but perhaps we can reopen it if it recurs in the future. |
Hi,
I trying to run the first tutorial like below
but I get the following error on beat_tracker:
The text was updated successfully, but these errors were encountered: