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

Use cpow=True in Python #1502

Merged
merged 1 commit into from
Feb 6, 2024
Merged

Use cpow=True in Python #1502

merged 1 commit into from
Feb 6, 2024

Conversation

mstimberg
Copy link
Member

Avoids that x**y becomes a float for two integers, leading to compilation errors. This behaviour changed with Cython 3.0. While I think there's a point for having x**y only being an integer if the compiler knows that y is non-negative, in practice I don't think there is much use of this kind of exponentiation outside of expressions such as (-1)**k. Whatever we'd decide for this in the long run, right now this fix assures that there is no difference depending on your version of Cython.

Fixes #1500

Avoids that x**y becomes a float for two integers, leading to compilation errors
cpow=True has been the default in Cython, but it changed to cpow=False with Cython 3.0

Fixes #1500
@mstimberg mstimberg merged commit 2cca2a4 into master Feb 6, 2024
60 checks passed
@mstimberg mstimberg deleted the cpow_cython branch February 6, 2024 12:55
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

Successfully merging this pull request may close these issues.

A bug in the Synapse.connect documentation
1 participant