jbn / ZigZag

Python library for identifying the peaks and valleys of a time series.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Exception ignored in: 'zigzag.core.identify_initial_pivot' ZeroDivisionError: float division

NTNguyen13 opened this issue · comments

Hi, thank you for great package.

I tried your package on my sample data, it runs fine without any problems, however, when dealing with real data, I have some datapoint equal to 0, which lead to the error:

Exception ignored in: 'zigzag.core.identify_initial_pivot' ZeroDivisionError: float division

Could you please help me to solve this problem? Many thanks

I'm not sure how to solve this. If your series had points [0.0 1.0] the increase is not defined. Automatic solutions would impose assumptions. I'd just add constant to the entire series to prevent <= 0.0