pygrams icon indicating copy to clipboard operation
pygrams copied to clipboard

porter emergence algorithm - uncaught divide by zero

Open l-bailey-fnc opened this issue 1 year ago • 1 comments

Describe the bug In emergence.py, the calculate_escore() method returns a divide by zero exception when there are quarterly periods with 0 patents in. This occurs on line 72.

Expected behavior divide by zero is handled safely and a sensible result is returned from the calculation.

l-bailey-fnc avatar Jun 19 '23 17:06 l-bailey-fnc

May only happen if input data is not sorted in ascending date order (oldest at the top of the csv file)

l-bailey-fnc avatar Aug 01 '23 18:08 l-bailey-fnc