jax.numpy.tanh

Contents

jax.numpy.tanh#

jax.numpy.tanh(x, /)#

Compute hyperbolic tangent element-wise.

LAX-backend implementation of numpy.tanh().

Original docstring below.

Equivalent to np.sinh(x)/np.cosh(x) or -1j * np.tan(1j*x).

Parameters:

x (array_like) – Input array.

Returns:

y – The corresponding hyperbolic tangent values. This is a scalar if x is a scalar.

Return type:

ndarray

References