scipp.tanh#
- scipp.tanh(x, *, out=None)#
Element-wise hyperbolic tangent.
The input unit must be dimensionless.
- Parameters:
- Returns:
Same type as input– The hyperbolic tangent values of the input.
Examples
Compute the hyperbolic tangent:
>>> import scipp as sc >>> x = sc.array(dims=['x'], values=[-1.0, 0.0, 1.0]) >>> sc.tanh(x) <scipp.Variable> (x: 3) float64 [dimensionless] [-0.761594, 0, 0.761594]
The output is bounded in the range (-1, 1).