arcsin¶
-
arcsin(x, out=None, **kwargs)¶ Inverse sine, element-wise.
Parameters: - 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.
Returns: - angle : ndarray or scalar
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].
Notes
arcsin 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, arcsin always returns real output. For each value that cannot be expressed as a real number or infinity, it yields
nanand 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.References
Abramowitz, M. and Stegun, I. A., Handbook of Mathematical Functions, 10th printing, New York: Dover, 1964, pp. 79ff. http://www.math.sfu.ca/~cbm/aands/
Examples
>>> np.arcsin(1) # pi/2 1.5707963267948966 >>> np.arcsin(-1) # -pi/2 -1.5707963267948966 >>> np.arcsin(0) 0.0