MTG / sms-tools

Sound analysis/synthesis tools for music applications
https://www.upf.edu/web/mtg/sms-tools
GNU Affero General Public License v3.0
1.64k stars 754 forks source link

ValueError: operands could not be broadcast together with shapes (100,) (0,) #145

Closed dhunstack closed 11 months ago

dhunstack commented 12 months ago

https://github.com/MTG/sms-tools/blob/b6ad1982ed6e7bff4f4b075e9afde674654620e9/software/models/harmonicModel.py#L78 ValueError: operands could not be broadcast together with shapes (100,) (0,)

Python - 3.10.13 Numpy - 1.25.2

This error occurs only for Harmonic Models. hfreqp seems to be initialized to a python list, but it becomes a numpy array after the first iteration for which this comparison wouldn't work as expected.

Screenshot 2023-11-06 at 21 00 32 Screenshot 2023-11-06 at 21 02 49