-
Notifications
You must be signed in to change notification settings - Fork 293
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
issue:fix for issue #690 - incorrect computation of n #708
Conversation
Hey @StatKumar. Can you please:
|
@jmoralez Thank you for the guidelines. Will update soon. |
Can you update this PR instead of opening a new one? |
Sure @jmoralez |
Check out this pull request on See visual diffs & provide feedback on Jupyter Notebooks. Powered by ReviewNB |
@jmoralez Updated the pull request with a new commit. Please let me know if anything else needs to be done. Thank you for taking time in guiding me through my first issue in statsforecast. |
Thanks @StatKumar! This also happens in the |
This is the fix for the issue # 690.
Math error was occurring when the len(n) = 1. While slicing the array, the last value of the array is not considered, and due to slicing, a variable's value was set to 0, and later in the code, log of that variable was taken, which led to math error.
Fix:
n = np.sum(~missing[firstnonmiss:lastnonmiss])
changed to
n = np.sum(~missing[firstnonmiss:])