MCPcopy Index your code
hub / github.com/numpy/numpy / arcsin

Function arcsin

numpy/lib/_scimath_impl.py:543–586  ·  view source on GitHub ↗

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)

Source from the content-addressed store, hash-verified

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

Callers 3

test_testUfuncs1Method · 0.90
test_basic_ufuncsMethod · 0.85

Calls 1

_fix_real_abs_gt_1Function · 0.85

Tested by 3

test_testUfuncs1Method · 0.72
test_basic_ufuncsMethod · 0.68

Used in the wild real call sites across dependent graphs

searching dependent graphs…