8000 Add complex number support to `sqrt` by kgryte · Pull Request #461 · data-apis/array-api · GitHub
[go: up one dir, main page]

Skip to content

Add complex number support to sqrt #461

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

Merged
merged 14 commits into from
Nov 27, 2022
Merged
Prev Previous commit
Next Next commit
Add warning concerning provisional status
  • Loading branch information
kgryte committed Nov 17, 2022
commit 3b0fe4f293bde934e589977cde581b545115904c
5 changes: 5 additions & 0 deletions spec/API_specification/array_api/elementwise_functions.py
Original file line number Diff line number Diff line change
Expand Up @@ -1495,6 +1495,11 @@ def sqrt(x: array, /) -> array:
The square root is a continuous function from above the branch cut, taking into account the sign of the imaginary component.

Accordingly, for complex arguments, the function returns the square root in the range of the right half-plane, including the imaginary axis (i.e., the plane defined by :math:`[0, +\infty)` along the real axis and :math:`(-\infty, +\infty)` along the imaginary axis).

.. warning::
The choice of the branch cut is considered _provisional_. While conforming implementations of the array API standard should adopt the branch cuts described in this standard, consumers of array API standard implementations should _not_ assume that branch cuts are consistent between implementations.

Provided no issues arise due to the choice of branch cut, the provisional status is likely to be removed in a future revision of this standard.

Parameters
----------
Expand Down
0