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

gh-112019: Add Py_complex_abs() function #112107

Closed
wants to merge 1 commit into from

Conversation

vstinner
Copy link
Member

@vstinner vstinner commented Nov 15, 2023

Add functions operating on Py_complex numbers:

  • Py_complex_sum()
  • Py_complex_diff()
  • Py_complex_neg()
  • Py_complex_prod()
  • Py_complex_quot()
  • Py_complex_pow()
  • Py_complex_abs()

Add basic tests on these functions in test_capi.


📚 Documentation preview 📚: https://cpython-previews--112107.org.readthedocs.build/

Add functions operating on Py_complex numbers:

* Py_complex_sum()
* Py_complex_diff()
* Py_complex_neg()
* Py_complex_prod()
* Py_complex_quot()
* Py_complex_pow()
* Py_complex_abs()

Add basic tests on these functions in test_capi.
@vstinner
Copy link
Member Author

cc @skirpichev @mdickinson

@vstinner
Copy link
Member Author

Only the numba is known to call _Py_c_pow(). Apparently, _Py_c functions are not used in the wild apart of the numba case. For now, I mark this PR as a draft.

@vstinner vstinner marked this pull request as draft November 15, 2023 05:18
@vstinner
Copy link
Member Author

I'm no longer convinced that we should make these APIs public. See #112019 discussion. I close this PR.

@vstinner vstinner closed this Nov 15, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant