jax.numpy.tanh
Warning
This page was created from a pull request (#9655).
jax.numpy.tanh¶
- jax.numpy.tanh(x)¶
Compute hyperbolic tangent element-wise.
LAX-backend implementation of
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
References
- 1
M. Abramowitz and I. A. Stegun, Handbook of Mathematical Functions. New York, NY: Dover, 1972, pg. 83. https://personal.math.ubc.ca/~cbm/aands/page_83.htm
- 2
Wikipedia, “Hyperbolic function”, https://en.wikipedia.org/wiki/Hyperbolic_function