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

Wrong results with Scipy 1.13 #418

Closed
mancellin opened this issue Apr 16, 2024 · 3 comments
Closed

Wrong results with Scipy 1.13 #418

mancellin opened this issue Apr 16, 2024 · 3 comments
Labels

Comments

@mancellin
Copy link

Describe the bug
Something changed between Scipy 1.12 and 1.13, that causes Chaospy to return clearly wrong values with the latest version of Scipy.

To Reproduce

$ pip install scipy==1.12
[...]
$ python -c 'import chaospy; print(chaospy.Normal().mom(2))'  
1.0000000000000002
$ pip install scipy==1.13
[...]
$ python -c 'import chaospy; print(chaospy.Normal().mom(2))'
[...]/lib/python3.12/site-packages/scipy/special/_basic.py:2930: RuntimeWarning: overflow encountered in scalar negative
  def corr(k, r): return np.power(k, -r / k) / gamma(r / k + 1) * r
[...]/lib/python3.12/site-packages/scipy/special/_basic.py:2930: RuntimeWarning: overflow encountered in power
  def corr(k, r): return np.power(k, -r / k) / gamma(r / k + 1) * r
inf

Expected behavior
The result returned by Scipy 1.12 is correct.

Desktop (please complete the following information):

  • OS: Linux
  • Python version: 3.12
  • Chaospy version: 4.3.13
@mancellin mancellin added the bug label Apr 16, 2024
@omnivagant
Copy link

We noticed this in alpinelinux after upgrading our py3-scipy to 1.13.0, we consider downgrading to 1.12.1. There is an upcoming 1.13.1 release where it would be good if this was addressed, if it isn't already, https://github.com/scipy/scipy/milestone/84

algitbot pushed a commit to alpinelinux/aports that referenced this issue Apr 23, 2024
py3-chaospy deadlocks in test with scipy 1.13. There are also unresolved
issues with 1.13 in chaospy. Downgrade to 1.11.4 for now.

ref: jonathf/chaospy#418
algitbot pushed a commit to alpinelinux/aports that referenced this issue Apr 23, 2024
chaspy does not work well with scipy 1.13.0

also fix typo in maintainer/contributor

ref: jonathf/chaospy#418
@jonathf
Copy link
Owner

jonathf commented Apr 25, 2024

Looks like scipy.special.factorial2 can't handle uint32 dtypes anymore.

I've made a bug report here: scipy/scipy#20580

I see also some of the other tests I have set up fails. I'll have a look and see if we need to make some patches.

@jonathf
Copy link
Owner

jonathf commented May 18, 2024

Solved upstream.

@jonathf jonathf closed this as completed May 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants