Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

porter emergence algorithm - uncaught divide by zero #381

Open
l-bailey-fnc opened this issue Jun 19, 2023 · 1 comment
Open

porter emergence algorithm - uncaught divide by zero #381

l-bailey-fnc opened this issue Jun 19, 2023 · 1 comment

Comments

@l-bailey-fnc
Copy link

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
Copy link
Author

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant