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

Scipy Factorial2 change #302

Closed
shivupa opened this issue Dec 8, 2023 · 4 comments
Closed

Scipy Factorial2 change #302

shivupa opened this issue Dec 8, 2023 · 4 comments

Comments

@shivupa
Copy link
Contributor

shivupa commented Dec 8, 2023

SciPy's factorial2 behavior changed in this commit scipy/scipy@5e91097
(It seems like factorial2(x<1) should have always returned zero, but it used to only do that if exact=True)

When factorial2 is called here with 0 then the factorial array now gets 0 instead of 1.

This causes the following issue with scipy 1.11.4

/usr/local/lib/python3.11/site-packages/iodata/overlap.py:277: RuntimeWarning: divide by zero encountered in scalar divide
  return np.sqrt((4.0 * alpha) ** sum(n) * (2.0 * alpha / np.pi) ** 1.5
@PaulWAyers
Copy link
Member

This is addressed in pending pull requestion #301 . For now, the work-around is to use scipy version 1.10 or less.

@shivupa
Copy link
Contributor Author

shivupa commented Dec 10, 2023

Yup sorry I missed that!

@shivupa shivupa closed this as completed Dec 10, 2023
@FarnazH
Copy link
Member

FarnazH commented Dec 11, 2023

Thanks, @shivupa for raising an issue. I just merged PR #301, so the code should work with any version of scipy.

@shivupa
Copy link
Contributor Author

shivupa commented Dec 12, 2023

Thanks!

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

3 participants