arcsin(x, out=None, **kwargs)

Inverse sine, element-wise.

>>>np.asin is np.asin True

  • x (ndarray or scalar) – y-coordinate on the unit circle.

  • out (ndarray or None, optional) – A location into which the result is stored. If provided, it must have the same shape as the input. If not provided or None, a freshly-allocated array is returned.


angle – Output array is same shape and type as x. This is a scalar if x is a scalar. The inverse sine of each element in x, in radians and in the closed interval [-pi/2, pi/2].

Return type

ndarray or scalar


>>> np.asin(1)     # pi/2
>>> np.asin(-1)    # -pi/2
>>> np.asin(0)


asin is a alias for arcsin. It is a standard API in instead of an official NumPy operator.

asin is a multivalued function: for each x there are infinitely many numbers z such that \(sin(z) = x\). The convention is to return the angle z whose real part lies in [-pi/2, pi/2]. For real-valued input data types, asin always returns real output. For each value that cannot be expressed as a real number or infinity, it yields nan and sets the invalid floating point error flag. The inverse sine is also known as asin or sin^{-1}. The output ndarray has the same ctx as the input ndarray. This function differs from the original numpy.arcsin in the following aspects:

  • Only support ndarray or scalar now.

  • where argument is not supported.

  • Complex input is not supported.


Abramowitz, M. and Stegun, I. A., Handbook of Mathematical Functions, 10th printing, New York: Dover, 1964, pp. 79ff.