mindspore.mint.acosh

View Source On Gitee
mindspore.mint.acosh(input)[source]

Computes inverse hyperbolic cosine of the inputs element-wise.

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

Note

Given an input tensor input, the function computes inverse hyperbolic cosine of every element. Input range is [1, inf].

Parameters

input (Tensor) – The input tensor of inverse hyperbolic cosine function.

Returns

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

Raises

TypeError – If input is not a Tensor.

Supported Platforms:

Ascend

Examples

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