The test suite fails on Python 3.10: issue with factorial() on NaN
See original GitHub issueOn Python 3.10, test_mixed_nan_inputs() of scipy.special.tests.test_basic.TestFactorialFunctions fails with:
if un.size:
> val = math.factorial(un[0])
E TypeError: 'float' object cannot be interpreted as an integer
See the downstream Fedora issue: https://bugzilla.redhat.com/show_bug.cgi?id=1898157
I wrote PR #13121 to fix this issue.
The issue was worked around by the commit f7b6202ae69282b0942a2f5671737a85a558e1b9 for Python 3.9:
commit f7b6202ae69282b0942a2f5671737a85a558e1b9
Author: Ralf Gommers <ralf.gommers@gmail.com>
Date: Sat May 9 15:31:07 2020 +0200
TST: filter out deprecation warning for using factorial() with floats
This was failing in py3.9-dev CI
cc @rgommers
Scipy/Numpy/Python version information:
- scipy 1.5.4-1.fc33
- Python 3.10.0a2
- python3-numpy 1:1.19.4-2.fc34
Issue Analytics
- State:
- Created 3 years ago
- Comments:11 (11 by maintainers)
Top Results From Across the Web
1898157 – scipy fails to build with Python 3.10: TypeError
scipy fails to build with Python 3.10.0a2. [gw2] linux -- Python 3.10.0 /usr/bin/python3 self = <scipy.special.tests.test_basic.
Read more >Skip factorial() float tests on Python 3.10 - resolves: #1898157
Skip factorial() float tests on Python 3.10 - resolves: #1898157. Build failed. failure. Built as scipy-1.5.4-2.fc34. 2 years ago. Build failed. failure.
Read more >math — Mathematical functions — Python 3.11.1 documentation
This module provides access to the mathematical functions defined by the C standard. These functions cannot be used with complex numbers; use the...
Read more >Changelog — Python 3.11.1 documentation
SetValueEx() now leaves the target value untouched in the case of ... and at least Microsoft Python 3.10.2288.0 installed without the Lib/test package....
Read more >What's New In Python 3.11 — Python 3.11.1 documentation
Python 3.11 is between 10-60% faster than Python 3.10. On average, we measured a 1.25x speedup on the standard benchmark suite. See Faster...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found

@rgommers Okay, I trust you 😄. I hope you don’t mind that I’ll link your comment to the issue that I’ll file with Poetry.
That’s unrelated to this issue. Python 3.10 is simply not yet released and 1.7.0 therefore does not support it. Why is Poetry trying to use Python 3.10 already?
This seems like bad design anyway on Poetry’s side. After Python 3.10.0 is released, it takes a while for projects to put up wheels that support that new Python version. So at that point Poetry will refuse to work for pretty much anyone that does not have an upper bound on Python version.
It will after I fix it. Currently
setup.pysayspython_requires='>=3.7',, which is wrong on the 1.21.x maintenance branch.