jax.numpy.sin#

jax.numpy.sin(x, /)[source]#

Compute a trigonometric sine of each element of input.

JAX implementation of numpy.sin.

Parameters:

x (ArrayLike) – array or scalar. Angle in radians.

Returns:

An array containing the sine of each element in x, promotes to inexact dtype.

Return type:

Array

See also

Examples

>>> pi = jnp.pi
>>> x = jnp.array([pi/4, pi/2, 3*pi/4, pi])
>>> with jnp.printoptions(precision=3, suppress=True):
...   print(jnp.sin(x))
[ 0.707  1.     0.707 -0.   ]