jax.numpy.sin
Contents
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 inexactdtype.- Return type:
See also
jax.numpy.cos(): Computes a trigonometric cosine of each element ofinput.jax.numpy.tan(): Computes a trigonometric tangent of each element ofinput.jax.numpy.arcsin()andjax.numpy.asin(): Computes the inverse oftrigonometric sine of each element of input.
Examples
>>>pi=jnp.pi>>>x=jnp.array([pi/4,pi/2,3*pi/4,pi])>>>withjnp.printoptions(precision=3,suppress=True):...print(jnp.sin(x))[ 0.707 1. 0.707 -0. ]
Contents
