-
-
Notifications
You must be signed in to change notification settings - Fork 46.7k
Help wanted: Why do maths/radix2_fft.py test results change on Python 3.14 beta? #12729
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
Comments
@cclauss In Python 3.14 Release Notes (https://docs.python.org/3.14/whatsnew/3.14.html) there are mentions of changes related to complex numbers:
This may be the reason for changes in the doctests. |
JFR, above pr was merged not before latest beta. Did you test alphas? |
https://github.com/TheAlgorithms/Python/actions/runs/14991034991/job/42114180325#step:5:20 This is beta 1. Or is uv using a different Py3.14? |
My question was did you test 3.14 alphas? |
Anyway, so far I can guess this might be related to: inverce_c = [round(x[0].real, 8) + round(x[0].imag, 8) * 1j for x in inverce_c] Probably, you want rather Python 3.14.0a7 (tags/v3.14.0a7:29af6cee02, Apr 9 2025, 12:48:04) [GCC 12.2.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> 1 + (-0.0)*1j
(1-0j)
Python 3.13.3 (tags/v3.13.3:6280bb5478, Apr 9 2025, 10:07:49) [GCC 12.2.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> 1 + (-0.0)*1j
(1+0j) Obviously, the last answer is incorrect as a replacement of |
See the required changes https://github.com/TheAlgorithms/Python/pull/12710/files#r2080117333
Repository commit
Same as #12710
Python version (python --version)
Python 3.14 beta 1
Dependencies version (pip freeze)
Same as:
Expected behavior
Doctest results do not need to change between Python 3.13 and 3.14 beta.
Actual behavior
See changes required in:
The text was updated successfully, but these errors were encountered: