tyiannak / pyAudioAnalysis

Python Audio Analysis Library: Feature Extraction, Classification, Segmentation and Applications
Apache License 2.0
5.76k stars 1.18k forks source link

Fixing zero division RuntimeWarning at ShortTermFeatures.py #323

Closed pakoromilas closed 3 years ago

pakoromilas commented 3 years ago

Fixed zero division happened at:

Also changed the eps value from 0.00000001 to system's epsilon which usually is 2.220446049250313e-16.

Tronic commented 3 years ago

See related discussion in #311

pakoromilas commented 3 years ago

See related discussion in #311

I faced the zero division when a zero signal (i.e. [0 0 0.... 0 0 0]) is given as an input to ShortTermFeatures.feature_extraction. I think what I did solves this rare case.