Compute the inverse sine of x. Return the "principal value" (for a description of this, see `numpy.arcsin`) of the inverse sine of `x`. For real `x` such that `abs(x) <= 1`, this is a real number in the closed interval :math:`[-\\pi/2, \\pi/2]`. Otherwise, the complex principl
(x)
| 530 | |
| 531 | @array_function_dispatch(_unary_dispatcher) |
| 532 | def arcsin(x): |
| 533 | """ |
| 534 | Compute the inverse sine of x. |
| 535 | |
| 536 | Return the "principal value" (for a description of this, see |
| 537 | `numpy.arcsin`) of the inverse sine of `x`. For real `x` such that |
| 538 | `abs(x) <= 1`, this is a real number in the closed interval |
| 539 | :math:`[-\\pi/2, \\pi/2]`. Otherwise, the complex principle value is |
| 540 | returned. |
| 541 | |
| 542 | Parameters |
| 543 | ---------- |
| 544 | x : array_like or scalar |
| 545 | The value(s) whose arcsin is (are) required. |
| 546 | |
| 547 | Returns |
| 548 | ------- |
| 549 | out : ndarray or scalar |
| 550 | The inverse sine(s) of the `x` value(s). If `x` was a scalar, so |
| 551 | is `out`, otherwise an array object is returned. |
| 552 | |
| 553 | See Also |
| 554 | -------- |
| 555 | numpy.arcsin |
| 556 | |
| 557 | Notes |
| 558 | ----- |
| 559 | For an arcsin() that returns ``NAN`` when real `x` is not in the |
| 560 | interval ``[-1,1]``, use `numpy.arcsin`. |
| 561 | |
| 562 | Examples |
| 563 | -------- |
| 564 | >>> np.set_printoptions(precision=4) |
| 565 | |
| 566 | >>> np.emath.arcsin(0) |
| 567 | 0.0 |
| 568 | |
| 569 | >>> np.emath.arcsin([0,1]) |
| 570 | array([0. , 1.5708]) |
| 571 | |
| 572 | """ |
| 573 | x = _fix_real_abs_gt_1(x) |
| 574 | return nx.arcsin(x) |
| 575 | |
| 576 | |
| 577 | @array_function_dispatch(_unary_dispatcher) |