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

compute_pvals passing invalid value to log_GP_pmf #25

Open
ypinto31 opened this issue Apr 2, 2024 · 1 comment
Open

compute_pvals passing invalid value to log_GP_pmf #25

ypinto31 opened this issue Apr 2, 2024 · 1 comment

Comments

@ypinto31
Copy link

ypinto31 commented Apr 2, 2024

When computing p-values, get an error saying an invalid value is being passed to sp.special.gammaln(x + 1) in the log_GP_pmf() function in the genpois module. Tried troubleshooting and found that rows from input file are being processed in a random order and the function fails at different rows each time. x, the variable that is being passed to the function is of type: numpy.int64.

RuntimeWarning: invalid value encountered in log

  • sp.special.gammaln(x + 1)
@laserson
Copy link
Member

laserson commented Apr 2, 2024

Unfortunately I don't have the bandwidth to debug this. If you are so inclined I'd review a PR if it's small. That said, I'm assuming that something like log(0) is being evaluated and that probably gets propagated as NaNs, in which case this may not be problematic?

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

2 participants