mindspore.Tensor.acosh

View Source On Gitee
Tensor.acosh() Tensor

Computes inverse hyperbolic cosine of self element-wise.

\[out_i = \cosh^{-1}(self_i)\]

Note

Input range is [1, inf].

Returns

Tensor, has the same shape as self. The dtype of output is float32 when dtype of self is in bool, int8, uint8, int16, int32, int64. Otherwise output has the same dtype as self.

Raises

TypeError – If self is not a Tensor.

Supported Platforms:

Ascend GPU CPU

Examples

>>> import mindspore
>>> import numpy as np
>>> from mindspore import Tensor
>>> x = Tensor(np.array([1.0, 1.5, 3.0, 100.0]), mindspore.float32)
>>> output = Tensor.acosh(x)  # x.acosh()
>>> print(output)
[0.        0.9624236 1.7627472 5.298292 ]