mindspore.ops.Acosh

class mindspore.ops.Acosh(*args, **kwargs)[source]

Computes inverse hyperbolic cosine of the inputs element-wise.

\[out_i = cosh^{-1}(input_i)\]
Inputs:
  • x (Tensor) - The shape of tensor is \((x_1, x_2, ..., x_R)\). The data type should be one of the following types: float16, float32.

Outputs:

Tensor, has the same shape and type as x.

Raises

TypeError – If x is not a Tensor.

Supported Platforms:

Ascend GPU CPU

Examples

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