mindspore.ops.Acosh

class mindspore.ops.Acosh[源代码]

Computes inverse hyperbolic cosine of the inputs element-wise.

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

Warning

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

Inputs:
  • x (Tensor) - The shape of tensor is \((N,*)\) where \(*\) means, any number of additional dimensions, its rank should be less than 8.

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, dtype
>>> acosh = ops.Acosh()
>>> x = Tensor(np.array([1.0, 1.5, 3.0, 100.0]), dtype.float32)
>>> output = acosh(x)
>>> print(output)
[0.        0.9624237 1.7627472 5.298292 ]