You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
BUG: smooth function produces negative numbers because of overflow #19
Just spotted a bug when working with a modified version of the smooth function for vocalpy.
I spotted it because I added an assertion checking that all values were positive after smoothing. They are not.
This happens because cbins are int16, and when we square, we get overflow for some values (any whose square are larger than np.iinfo('>i2') (or whatever the dtype is on your platform)). Not sure yet if this bug holds in the original evsonganaly or whether Matlab does something different to deal with this.
Not sure how to handle but we shouldn't keep failing silently. For purposes of this package we want to replicate what evsonganaly does--if that's overflowing, then we should just maintain that but probably issue a warning so it's not happening silently at least. Maybe include a URL to this issue in the warning.
Another option would be to just build in functionality to convert to float values / .wav -- basically what I do in the bfsongrepo dataset. I think this is not an issue once the audio signal is float since you can't get overflow in the same way then
I think that counterintuitively the bug might not matter too much because of how smoothing + time-frequency transforms work, but still this is not great
determine whether this is a bug in evsonganaly too or it's some mistake I made
add assertion that tests that all values are positive after running smooth
changed the title [-]smooth function produces negative numbers because of overflow[/-][+]BUG: smooth function produces negative numbers because of overflow[/+]on May 6, 2023
Activity
[-]smooth function produces negative numbers because of overflow[/-][+]BUG: smooth function produces negative numbers because of overflow[/+]