pygrams
pygrams copied to clipboard
porter emergence algorithm - uncaught divide by zero
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.
May only happen if input data is not sorted in ascending date order (oldest at the top of the csv file)