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

Problem overflow when computing the power of higher values #10

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

salmuz
Copy link

@salmuz salmuz commented Nov 17, 2023

Hello,

Thanks for your library. I catch a bug in calculating the power of higher values.

When we have higher mu, scale and x values, for instance:

x = [2881890.0, 1520335.0, 338717.0, 1842502.0, 325209.0, 282761.0, 847733.0, 1183272.0, 16533530.0]
mu = [1540092.433139984, 1157811.842, 775235.501, 660113.3310, 876908.8905, 1098942.967, 1275848.455, 1136826.756, 17490555.9386]
tweedie(mu=mu, p=1.0275417, phi=216098.00079).logpdf(x).sum()

We obtain an error: RuntimeWarning: overflow encountered in multiply tweedie
I tested that with Python 3.10

Computing higher power can throw a exception 

RuntimeWarning: overflow encountered in multiply tweedie
@thequackdaddy
Copy link
Owner

Thanks for the PR!

So I haven't been around recently ... sorry. There used to be a travis test suite that would run, but I know GitHub has been changing things around. I guess we should get the test suite working first (and made up to date) before merging. Once that is done, I'm happy to make some wheels and publish to pypi.

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

Successfully merging this pull request may close these issues.

2 participants