jax.numpy.arcsin — JAX documentation (original) (raw)
jax.numpy.arcsin#
jax.numpy.arcsin(x, /)[source]#
Compute element-wise inverse of trigonometric sine of input.
JAX implementation of numpy.arcsin.
Parameters:
x (ArrayLike) – input array or scalar.
Returns:
An array containing the inverse trigonometric sine of each element of xin radians in the range [-pi/2, pi/2], promoting to inexact dtype.
Return type:
Note
jnp.arcsinreturnsnanwhenxis real-valued and not in the closed interval[-1, 1].jnp.arcsinfollows the branch cut convention of numpy.arcsin for complex inputs.
See also
- jax.numpy.sin(): Computes a trigonometric sine of each element of input.
- jax.numpy.arccos() and jax.numpy.acos(): Computes the inverse of trigonometric cosine of each element of input.
- jax.numpy.arctan() and jax.numpy.atan(): Computes the inverse of trigonometric tangent of each element of input.
Examples
x = jnp.array([-2, -1, -0.5, 0, 0.5, 1, 2]) with jnp.printoptions(precision=3, suppress=True): ... jnp.arcsin(x) Array([ nan, -1.571, -0.524, 0. , 0.524, 1.571, nan], dtype=float32)
For complex-valued inputs:
with jnp.printoptions(precision=3, suppress=True): ... jnp.arcsin(3+4j) Array(0.634+2.306j, dtype=complex64, weak_type=True)