jax.numpy.tan#
- jax.numpy.tan(x, /)[source]#
Compute a trigonometric tangent of each element of input.
JAX implementation of
numpy.tan
.- Parameters:
x (ArrayLike) – scalar or array. Angle in radians.
- Returns:
An array containing the tangent of each element in
x
, promotes to inexact dtype.- Return type:
See also
jax.numpy.sin()
: Computes a trigonometric sine of each element of input.jax.numpy.cos()
: Computes a trigonometric cosine of each element of input.jax.numpy.arctan()
andjax.numpy.atan()
: Computes the inverse of trigonometric tangent of each element of input.
Examples
>>> pi = jnp.pi >>> x = jnp.array([0, pi/6, pi/4, 3*pi/4, 5*pi/6]) >>> with jnp.printoptions(precision=3, suppress=True): ... print(jnp.tan(x)) [ 0. 0.577 1. -1. -0.577]