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
Update intervals
  • Loading branch information
kgryte committed Nov 17, 2022
commit 51fee427fc51717c6b3fc24fea1b09488e65d3f8
4 changes: 2 additions & 2 deletions spec/API_specification/array_api/elementwise_functions.py
Original file line number Diff line number Diff line change
Expand Up @@ -1490,11 +1490,11 @@ def sqrt(x: array, /) -> array:
For complex floating-point operands, ``sqrt(conj(x))`` must equal ``conj(sqrt(x))``.

.. note::
By convention, the branch cut of square root is the real interval :math:`[\infty, 0)`.
By convention, the branch cut of square root is the negative real axis :math:`(-\infty, 0)`.

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).
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).

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